when setting breakpoint, only resume if actually interrupted

RESOLVED FIXED in Firefox 34

Status

()

Firefox
Developer Tools: Debugger
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jlongster, Assigned: fitzgen)

Tracking

unspecified
Firefox 34
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
In `setBreakpoint` in dbg-client.jsm, we resume the thread if we had to interrupt it to set the breakpoint. The `resume` called at the end of the function should only happen if the pause type is "interrupt". There's probably a race condition in there so we should add the check for good measure.
(Reporter)

Updated

3 years ago
Assignee: nobody → jlong
Good idea.
Created attachment 8479270 [details] [diff] [review]
bp-interrupt.patch

Unfortunately, I wasn't able to write a failing test. I was able to write a test that printed out an error message when we hit the race, but I couldn't create an assertion that failed with the error message. Either way, this change made the error message go away.

Try push: https://tbpl.mozilla.org/?tree=Try&rev=993df2622b70
Assignee: jlong → nfitzgerald
Status: NEW → ASSIGNED
Attachment #8479270 - Flags: review?(past)
Created attachment 8479273 [details] [diff] [review]
non-failing-test-case.patch

For posterity, this is the test case that I could get an error message to be printed without the previous patch applied, but couldn't get it to actually fail any assertions.
Attachment #8479270 - Flags: review?(past) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/2498263e8cf7
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/2498263e8cf7
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
QA Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.