-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Milestone
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
| export function setup_proxy_console(id: string, originalConsole: Console, origin: string): void { |
and
runtime/src/mono/wasm/runtime/startup.ts
Line 789 in 778137b
| async function mono_wasm_pthread_worker_init(): Promise<void> { |
(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)