зеркало из 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() {
|
||||
is(output.value, "step out", "debugger stepped out");
|
||||
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) {
|
||||
helpers.audit(options, [{
|
||||
setup: "dbg close",
|
||||
completed: false,
|
||||
exec: { output: "" }
|
||||
}]);
|
||||
function closeDebugger(cb) {
|
||||
helpers.audit(options, [{
|
||||
setup: "dbg close",
|
||||
completed: false,
|
||||
exec: { output: "" }
|
||||
}]);
|
||||
|
||||
let toolbox = gDevTools.getToolbox(options.target);
|
||||
if (!toolbox) {
|
||||
let toolbox = gDevTools.getToolbox(options.target);
|
||||
if (!toolbox) {
|
||||
ok(true, "Debugger was closed.");
|
||||
cb();
|
||||
} else {
|
||||
toolbox.on("destroyed", function () {
|
||||
ok(true, "Debugger was closed.");
|
||||
cb();
|
||||
} else {
|
||||
toolbox.on("destroyed", function () {
|
||||
ok(true, "Debugger was closed.");
|
||||
cb();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// We're closing the debugger twice to make sure
|
||||
// 'dbg close' doesn't error when toolbox is already
|
||||
// closed. See bug 884638 for more info.
|
||||
// We're closing the debugger twice to make sure
|
||||
// 'dbg close' doesn't error when toolbox is already
|
||||
// closed. See bug 884638 for more info.
|
||||
|
||||
closeDebugger(() => {
|
||||
closeDebugger(() => deferred.resolve());
|
||||
});
|
||||
closeDebugger(() => {
|
||||
closeDebugger(() => deferred.resolve());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -413,6 +413,14 @@ ThreadActor.prototype = {
|
|||
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) {
|
||||
|
|
|
@ -151,11 +151,7 @@ function runTest(aOnSteppedLocation, aOnDebuggerStatementFrames, aFinishedCallba
|
|||
do_check_eq(aPacket.why.type, "debuggerStatement");
|
||||
gThreadClient.getFrames(0, 100, function ({frames}) {
|
||||
aOnDebuggerStatementFrames(frames);
|
||||
// We hit the breakpoint once more on the way out
|
||||
gClient.addOneTimeListener("paused", function () {
|
||||
gThreadClient.resume(aFinishedCallback);
|
||||
});
|
||||
gThreadClient.resume();
|
||||
gThreadClient.resume(aFinishedCallback);
|
||||
});
|
||||
});
|
||||
gThreadClient.resume();
|
||||
|
|
Загрузка…
Ссылка в новой задаче