Closed Bug 1133196 Opened 9 years ago Closed 9 years ago

Assertion failure: frame.isDebuggee(), at Debugger.cpp:1987

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: jandem, Assigned: shu)

Details

Attachments

(1 file)

Test below asserts (inbound revision 4d4b564c9d84, 32-bit OS X), even with --no-baseline.

var g = newGlobal();
g.parent = this;
g.eval("(" + function() {
    var dbg = new Debugger(parent);
    dbg.onExceptionUnwind = function(frame) {
        frame.older.onStep = function() {}
    };
} + ")()");
function f() {
    (function inner(arr) {
        inner(arr.map);
    })([]);
}
f();
Flags: needinfo?(shu)
Interesting. The immediate cause of this is that Debugger.Frame.onStep doesn't trigger script-wide recompilation, since it's a Debugger.Frame API.

But! Due to crappy historical reasons, the "step mode" is a flag on the DebugScript, which is also the thing that keeps breakpoints. JSScript::isDebuggee returns true if the script has a DebugScript at all. If this doesn't require an immediate fix, I'm going to try to move the "step mode" flag off DebugScript and into and InterpreterFrame and BaselineFrame.
"crappy historical reasons" above being JSD1.
Flags: needinfo?(shu)
Assignee: nobody → shu
Status: NEW → ASSIGNED
I take back my previous comment. With the way call toggling works on baseline
scripts right now, it's better to make the whole script observable.

Jan, I think Jim is backed up on reviews. This is a Debugger-internal change,
but is easy enough to review if you trust the functions to do what their names
say.
Attachment #8568304 - Flags: review?(jdemooij)
Comment on attachment 8568304 [details] [diff] [review]
Ensure script observability when setting Debugger.Frame.onStep.

Review of attachment 8568304 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM, sorry for the delay.
Attachment #8568304 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/mozilla-central/rev/c40a8aba7b4d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: