Closed
Bug 1979728
Opened 1 year ago
Closed 1 year ago
Errors from subprocess worker do not include the original stack
Categories
(Toolkit :: Async Tooling, task)
Toolkit
Async Tooling
Tracking
()
RESOLVED
FIXED
143 Branch
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 external file)
While working on bug 1979546, I noticed that runtime errors in the subprocess module do not include a stack trace of the true source of the error.
E.g. if I intentionally throw from here by calling a non-existing function throwMe();,
then the console (pasted from a xpcshell test) contains the following entries:
[JavaScript Error: "uncaught exception: Object" { file: "resource://gre/modules/subprocess/subprocess_common.sys.mjs" line: 199 }](link to source)console.error: (new NotSupportedError("ClonedErrorHolder constructor: We can only clone DOM Exceptions and native JS Error objects", (void 0), 219)).[JavaScript Error: "throwMe not defined" {file: "resource://gre/modules/NativeMessaging.sys.mjs" line: 133 }](link to source)
I think that this is happening because we turn an error into an object at https://searchfox.org/mozilla-central/rev/45aff2630491c295fc6c28198b629ff2de14e637/toolkit/modules/subprocess/subprocess_worker_common.js#206-215
Probably because the code predates support for errors in structured cloning.
Let's simplify the implementation so that true errors are reported, without strange bugs.
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Pushed by rob@robwu.nl:
https://github.com/mozilla-firefox/firefox/commit/1237a547e337
https://hg.mozilla.org/integration/autoland/rev/6e316dc57c59
Fix error propagation from subprocess worker r=rpl
Comment 3•1 year ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 1 year ago
status-firefox143:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
Updated•1 year ago
|
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in
before you can comment on or make changes to this bug.
Description
•