Closed
Bug 878319
Opened 11 years ago
Closed 11 years ago
JS debugger: move makeInfallible into a shareable JSM
Categories
(DevTools :: Debugger, defect)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 24
People
(Reporter: jimb, Assigned: jimb)
References
Details
Attachments
(1 file, 1 obsolete file)
6.97 KB,
patch
|
dcamp
:
review+
|
Details | Diff | Splinter Review |
It's annoying not to have it readily available, since it's really needed almost any time one uses IDL-based callbacks.
Attachment #756826 -
Flags: review?(dcamp)
Updated•11 years ago
|
Attachment #756826 -
Flags: review?(dcamp) → review+
Assignee | ||
Comment 1•11 years ago
|
||
Assignee: nobody → jimb
Status: NEW → ASSIGNED
Flags: in-testsuite-
Target Milestone: --- → Firefox 24
Comment 2•11 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/fc1972bf1410 - browser_dbg_chrome-debugging.js timed out, then the whole suite timed out after 7200 seconds of nothing happening, a la https://tbpl.mozilla.org/php/getParsedLog.php?id=23687167&tree=Mozilla-Inbound&full=1
Assignee | ||
Comment 3•11 years ago
|
||
I missed a use of safeErrorString in toolkit/devtools/server/main.js. Try push for revised version:
https://tbpl.mozilla.org/?tree=Try&rev=8043a802ec56
(What's ironic is that this patch is about making some functions for reliably catching and reporting errors more easily available by moving them to their own JSM. We've used them to ensure that unexpected exceptions in the JS debugger's xpcshell tests reliably cause test failures, but we haven't tightened up the debugger's mochitests this way yet. The mochitests do use one error-reporting function, which my move made unavailable... causing the mochitests to hang without failing... in exactly the way that those functions were created to make it easier to avoid.)
Assignee | ||
Comment 4•11 years ago
|
||
This is kind of pathetic: this breaks chrome debugging (the checks are working as intended, for once).
makeInfallible returns a closure of one of its nested functions. One of these closures will be on the stack whenever the debugger server is handling a packet from the client, because that little closure from makeInfallible needs to catch and report any uncaught exceptions thrown by the packet handling code.
But each JSM gets its own global object. By putting makeInfallible in its own JSM, we've moved it to a global that addAllGlobalsAsDebuggees doesn't recognize as part of the debugger (it knows to skip the global whose compartment contains the Debugger instance, but that's as much as it knows). So when the chrome debugger actor gets an 'attach' packet, it tries to add makeInfallible's compartment as a debuggee, but fails.
So we have to use loadSubScript.
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
Requesting new review; should be quick.
Attachment #756826 -
Attachment is obsolete: true
Attachment #757491 -
Flags: review?(dcamp)
Updated•11 years ago
|
Attachment #757491 -
Flags: review?(dcamp) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Try looked good.
https://hg.mozilla.org/integration/mozilla-inbound/rev/24e9d3a53f8b
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•