зеркало из https://github.com/mozilla/gecko-dev.git
Clear any previous stepping hooks on a plain resumption (bug 832234); r=rcampbell
This commit is contained in:
Родитель
324ff6d89d
Коммит
db345be1be
|
@ -54,35 +54,33 @@ function test() {
|
||||||
cmd("dbg step out", function() {
|
cmd("dbg step out", function() {
|
||||||
is(output.value, "step out", "debugger stepped out");
|
is(output.value, "step out", "debugger stepped out");
|
||||||
cmd("dbg continue", function() {
|
cmd("dbg continue", function() {
|
||||||
cmd("dbg continue", function() {
|
is(output.value, "dbg continue", "debugger continued");
|
||||||
is(output.value, "dbg continue", "debugger continued");
|
|
||||||
|
|
||||||
function closeDebugger(cb) {
|
function closeDebugger(cb) {
|
||||||
helpers.audit(options, [{
|
helpers.audit(options, [{
|
||||||
setup: "dbg close",
|
setup: "dbg close",
|
||||||
completed: false,
|
completed: false,
|
||||||
exec: { output: "" }
|
exec: { output: "" }
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
let toolbox = gDevTools.getToolbox(options.target);
|
let toolbox = gDevTools.getToolbox(options.target);
|
||||||
if (!toolbox) {
|
if (!toolbox) {
|
||||||
|
ok(true, "Debugger was closed.");
|
||||||
|
cb();
|
||||||
|
} else {
|
||||||
|
toolbox.on("destroyed", function () {
|
||||||
ok(true, "Debugger was closed.");
|
ok(true, "Debugger was closed.");
|
||||||
cb();
|
cb();
|
||||||
} else {
|
});
|
||||||
toolbox.on("destroyed", function () {
|
|
||||||
ok(true, "Debugger was closed.");
|
|
||||||
cb();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// We're closing the debugger twice to make sure
|
// We're closing the debugger twice to make sure
|
||||||
// 'dbg close' doesn't error when toolbox is already
|
// 'dbg close' doesn't error when toolbox is already
|
||||||
// closed. See bug 884638 for more info.
|
// closed. See bug 884638 for more info.
|
||||||
|
|
||||||
closeDebugger(() => {
|
closeDebugger(() => {
|
||||||
closeDebugger(() => deferred.resolve());
|
closeDebugger(() => deferred.resolve());
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -413,6 +413,14 @@ ThreadActor.prototype = {
|
||||||
stepFrame.onPop = onPop;
|
stepFrame.onPop = onPop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Clear any previous stepping hooks on a plain resumption.
|
||||||
|
let frame = this.youngestFrame;
|
||||||
|
while (frame) {
|
||||||
|
frame.onStep = undefined;
|
||||||
|
frame.onPop = undefined;
|
||||||
|
frame = frame.older;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aRequest) {
|
if (aRequest) {
|
||||||
|
|
|
@ -151,11 +151,7 @@ function runTest(aOnSteppedLocation, aOnDebuggerStatementFrames, aFinishedCallba
|
||||||
do_check_eq(aPacket.why.type, "debuggerStatement");
|
do_check_eq(aPacket.why.type, "debuggerStatement");
|
||||||
gThreadClient.getFrames(0, 100, function ({frames}) {
|
gThreadClient.getFrames(0, 100, function ({frames}) {
|
||||||
aOnDebuggerStatementFrames(frames);
|
aOnDebuggerStatementFrames(frames);
|
||||||
// We hit the breakpoint once more on the way out
|
gThreadClient.resume(aFinishedCallback);
|
||||||
gClient.addOneTimeListener("paused", function () {
|
|
||||||
gThreadClient.resume(aFinishedCallback);
|
|
||||||
});
|
|
||||||
gThreadClient.resume();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
gThreadClient.resume();
|
gThreadClient.resume();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче