Closed
Description
Similar to what is done for the crypto WebWorker, we need to redirect console.{log,info,warn,error,trace}
to a websocket back to xharness for testing purposes.
See
runtime/src/mono/wasm/runtime/debug.ts
Line 475 in 778137b
and
runtime/src/mono/wasm/runtime/startup.ts
Line 789 in 778137b
(note we don't want to set up the redirection on pthread creation - we want to do it when the worker that will run pthreads is created. Emscripten reuses workers to run pthreads when one thread shuts down and another one starts)