mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-09-04 01:50:12 +02:00
* Change some code that results in browser warning about unreachable code (bug ID 37246)
This commit is contained in:
parent
a9eed7255c
commit
df8e44ef3e
@ -1045,6 +1045,7 @@ end;
|
|||||||
|
|
||||||
function TObject.GetInterfaceByStr(const iidstr: String; out obj): boolean;
|
function TObject.GetInterfaceByStr(const iidstr: String; out obj): boolean;
|
||||||
begin
|
begin
|
||||||
|
Result:=false;
|
||||||
if not TJSObj(IObjectInstance)['$str'] then
|
if not TJSObj(IObjectInstance)['$str'] then
|
||||||
TJSObj(IObjectInstance)['$str']:=GUIDToString(IObjectInstance);
|
TJSObj(IObjectInstance)['$str']:=GUIDToString(IObjectInstance);
|
||||||
if iidstr = TJSObj(IObjectInstance)['$str'] then
|
if iidstr = TJSObj(IObjectInstance)['$str'] then
|
||||||
@ -1055,9 +1056,8 @@ begin
|
|||||||
asm
|
asm
|
||||||
var i = rtl.getIntfG(this,iidstr,2);
|
var i = rtl.getIntfG(this,iidstr,2);
|
||||||
obj.set(i);
|
obj.set(i);
|
||||||
return i!==null;
|
Result=(i!==null);
|
||||||
end;
|
end;
|
||||||
Result:=false;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TObject.GetInterfaceWeak(const iid: TGuid; out obj): boolean;
|
function TObject.GetInterfaceWeak(const iid: TGuid; out obj): boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user