Browse Source

wasi: clean up

mattias 3 years ago
parent
commit
31d1d84886
2 changed files with 2 additions and 12 deletions
  1. 1 9
      packages/wasi/wasienv.pas
  2. 1 3
      packages/wasi/wasihostapp.pas

+ 1 - 9
packages/wasi/wasienv.pas

@@ -556,13 +556,6 @@ function TWASIHost.CreateWebAssembly(aPath: string; aImportObject: TJSObject
     Result:=TJSResponse(Res).arrayBuffer._then(@ArrayOK,Nil)
   end;
 
-  function DoFail(Res : jsValue) : JSValue;
-
-  begin
-    Console.Log('Failed to fetch webassembly '+aPath+' : ');
-    Console.Debug(res);
-  end;
-
 begin
   Result:=fetch(aPath)._then(@fetchOK);
 end;
@@ -643,6 +636,7 @@ Var
   function DoFail(aValue: JSValue): JSValue;
 
   begin
+    Result:=True;
     Console.Log('Failed to create webassembly. Reason:');
     Console.Debug(aValue);
   end;
@@ -905,7 +899,6 @@ var
     Result:=true;
   end;
 
-
 begin
   BufferBytes:=TJSArray.New;
   view:=getModuleMemoryDataView();
@@ -1230,7 +1223,6 @@ var
     Result:=true;
   end;
 
-
 begin
   bytesRead:=0;
   view:=getModuleMemoryDataView();

+ 1 - 3
packages/wasi/wasihostapp.pas

@@ -9,9 +9,7 @@ uses
 
 Type
 
-  { TWASIHostApplication }
-
-
+  { TBrowserWASIHostApplication }
 
   TBrowserWASIHostApplication = class(TBrowserApplication)
   private