mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-19 05:39:03 +02:00
wasi: clean up
This commit is contained in:
parent
eb74dbf3b0
commit
31d1d84886
@ -556,13 +556,6 @@ function TWASIHost.CreateWebAssembly(aPath: string; aImportObject: TJSObject
|
|||||||
Result:=TJSResponse(Res).arrayBuffer._then(@ArrayOK,Nil)
|
Result:=TJSResponse(Res).arrayBuffer._then(@ArrayOK,Nil)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function DoFail(Res : jsValue) : JSValue;
|
|
||||||
|
|
||||||
begin
|
|
||||||
Console.Log('Failed to fetch webassembly '+aPath+' : ');
|
|
||||||
Console.Debug(res);
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=fetch(aPath)._then(@fetchOK);
|
Result:=fetch(aPath)._then(@fetchOK);
|
||||||
end;
|
end;
|
||||||
@ -643,6 +636,7 @@ Var
|
|||||||
function DoFail(aValue: JSValue): JSValue;
|
function DoFail(aValue: JSValue): JSValue;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Result:=True;
|
||||||
Console.Log('Failed to create webassembly. Reason:');
|
Console.Log('Failed to create webassembly. Reason:');
|
||||||
Console.Debug(aValue);
|
Console.Debug(aValue);
|
||||||
end;
|
end;
|
||||||
@ -905,7 +899,6 @@ var
|
|||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
BufferBytes:=TJSArray.New;
|
BufferBytes:=TJSArray.New;
|
||||||
view:=getModuleMemoryDataView();
|
view:=getModuleMemoryDataView();
|
||||||
@ -1230,7 +1223,6 @@ var
|
|||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
bytesRead:=0;
|
bytesRead:=0;
|
||||||
view:=getModuleMemoryDataView();
|
view:=getModuleMemoryDataView();
|
||||||
|
@ -9,9 +9,7 @@ uses
|
|||||||
|
|
||||||
Type
|
Type
|
||||||
|
|
||||||
{ TWASIHostApplication }
|
{ TBrowserWASIHostApplication }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TBrowserWASIHostApplication = class(TBrowserApplication)
|
TBrowserWASIHostApplication = class(TBrowserApplication)
|
||||||
private
|
private
|
||||||
|
Loading…
Reference in New Issue
Block a user