Closed Bug 865509 Opened 7 years ago Closed 7 years ago

JS debugger: UnsolicitedPauses in dbg-client.jsm should mention 'exception'

Categories

(DevTools :: Debugger, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: jimb, Assigned: jimb)

References

Details

Attachments

(1 file)

When resuming with pauseOnExceptions set, the server may send a "paused" packet whose 'why' type is 'exception'. DebuggerClient.prototype.onPacket ought to recognize that as not being a response, but since 'exception' does not appear in the UnsolicitedPauses table, it treats it as a response.

As a result, the call to this.activeThread.detach in DebuggerClient.prototype.close can end up calling its callback function, detachTab, as soon as client receives the "paused" packet, because ThreadClient.prototype.detach treats the "paused" packet as a response. This may result in the transport being closed before the eventual "detached" packet has been delivered. Delivering packets to closed transports causes an error.
Attachment #741603 - Flags: review?(dcamp)
Attachment #741603 - Flags: review?(dcamp) → review+
Blocks: 865073
https://hg.mozilla.org/integration/mozilla-inbound/rev/98ce2f896253
Status: NEW → ASSIGNED
Flags: in-testsuite+
Target Milestone: --- → Firefox 23
https://hg.mozilla.org/mozilla-central/rev/98ce2f896253
Assignee: nobody → jimb
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.