Sfoglia il codice sorgente

* Take into account SendOutputToBrowser

Michael Van Canneyt 5 mesi fa
parent
commit
57c841e471
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      packages/wasi/src/wasiworkerthreadhost.pas

+ 2 - 1
packages/wasi/src/wasiworkerthreadhost.pas

@@ -673,7 +673,8 @@ end;
 
 procedure TWorkerThreadRunnerApplication.HandleConsoleWrite(Sender: TObject; aOutput: string);
 begin
-  ConsoleChannel.postMessage(TWorkerConsoleCommand.Create(aOutput));
+  if SendOutputToBrowser then
+    ConsoleChannel.postMessage(TWorkerConsoleCommand.Create(aOutput));
 end;
 
 function TWorkerThreadRunnerApplication.CreateWorkerThreadSupport(aEnv : TPas2JSWasiEnvironment) : TWorkerThreadSupport;