Browse Source

* Do not free temp objects in callback: webassembly code may save them

Michael Van Canneyt 1 year ago
parent
commit
86ac1eaf30
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/job/src/job_browser.pp

+ 2 - 1
packages/job/src/job_browser.pp

@@ -951,7 +951,8 @@ begin
         View.setUint8(p,JOBArgObject);
         inc(p);
         NewId:=RegisterLocalObject(TJSObject(Arg));
-        TJSArray(TempObjIds).push(NewId);
+        // Do not free these objects after the call, as they may be saved by the webassembly
+        // TJSArray(TempObjIds).push(NewId);
         {$IFDEF VERBOSEJOB}
         writeln('TJSObjectBridge.CreateCallbackArgs Object ID=',NewID);
         {$ENDIF}