Stacks are missing for uncaught exceptions in workers
Categories
(DevTools :: Console, defect, P2)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
Uncaught exceptions in worker threads are shown in the console, with the location of the place the exception was thrown from but no stack trace.
Comment 1•5 years ago
|
||
Using this test page https://melodic-client-1.glitch.me/, I don't even see the location.
The error object is created in dom/workers/WorkerError.cpp#487-491, using a nsScriptError
, where it could use a nsScriptErrorWithStack
I guess?
Brian, would you mind checking if this can be fixed quickly? Thanks!
Assignee | ||
Comment 2•5 years ago
|
||
I was working on this yesterday and should have a patch later today. We do need to use nsScriptErrorWithStack, but the tricky part is getting the stack info from the worker thread to the main thread (where the nsScriptErrorWithStack is created).
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Depends on D27334
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D27335
Assignee | ||
Comment 6•5 years ago
|
||
New test, for reference.
![]() |
||
Comment 7•5 years ago
|
||
Comment on attachment 9058186 [details] [diff] [review] Part 4 - Add test for uncaught worker errors. Might be good to have tests for throwing |new DOMException| too.
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/57904fc5ae57 Part 1 - Add API to set the stack for a pending exception, r=sfink. https://hg.mozilla.org/integration/mozilla-inbound/rev/39a877972476 Part 2 - Include stack in worker error reports, r=bz. https://hg.mozilla.org/integration/mozilla-inbound/rev/e38792ce2185 Part 3 - Use stack for error location if none was specified, r=nchevobbe. https://hg.mozilla.org/integration/mozilla-inbound/rev/f236858f5add Part 4 - Add test for uncaught worker errors.
Comment 9•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/57904fc5ae57
https://hg.mozilla.org/mozilla-central/rev/39a877972476
https://hg.mozilla.org/mozilla-central/rev/e38792ce2185
https://hg.mozilla.org/mozilla-central/rev/f236858f5add
Description
•