You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[browser][mt] Propagate unhandled JS errors in JSWebWorker to the top level Task #76957
If user code uses setTimeout to queue work on the JSWebWorker and that code throws unhandled exceptions, we should not bring down the whole runtime in a disorganized manner.
Should we propagate unhandled JS errors the JSWebWorker top level Task ?
Activity
ghost added
untriagedNew issue has not been triaged by the area owner
changed the title [-]protect pthread workers from unhandled JS exceptions.[/-][+][wasm-mt] protect pthread workers from unhandled JS exceptions.[/+]on Oct 12, 2022
changed the title [-][wasm-mt] protect pthread workers from unhandled JS exceptions.[/-][+][browser][mt] protect pthread workers from unhandled JS exceptions.[/+]on Nov 9, 2023
We do subscribe to unhandledrejection and error top level events in the UI thread and shut down the runtime when that happens, when internal withExitOnUnhandledError is used.
changed the title [-][browser][mt] protect pthread workers from unhandled JS exceptions.[/-][+][browser][mt] Propagate unhandled JS errors in JSWebWorker to the top level Task[/+]on Feb 5, 2024
Activity
[-]protect pthread workers from unhandled JS exceptions.[/-][+][wasm-mt] protect pthread workers from unhandled JS exceptions.[/+]pavelsavara commentedon Nov 9, 2023
I guess we don't have any manifestation of this yet?
Anyway, I think that calling back from JS to C# will happen via
JSExportand that propagates exceptions correctly.Is there another concern ?
[-][wasm-mt] protect pthread workers from unhandled JS exceptions.[/-][+][browser][mt] protect pthread workers from unhandled JS exceptions.[/+]pavelsavara commentedon Jan 31, 2024
We do subscribe to
unhandledrejectionanderrortop level events in the UI thread and shut down the runtime when that happens, when internalwithExitOnUnhandledErroris used.runtime/src/mono/browser/runtime/loader/run.ts
Lines 75 to 76 in 9429e43
Is that too strict ?
Should we adopt the same on the
JSWebWorkertoo ?pavelsavara commentedon Jan 31, 2024
Maybe
JSWebWorkershould propagate unhandled JS errors fromsetTimeoutto theJSWebWorkertop levelTask?[-][browser][mt] protect pthread workers from unhandled JS exceptions.[/-][+][browser][mt] Propagate unhandled JS errors in JSWebWorker to the top level Task[/+]