Bug 1565578 - 'Step in' exits function. r=loganfsmyth

Differential Revision: https://phabricator.services.mozilla.com/D38769

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Laster 2019-07-29 22:40:53 +00:00
parent 4fefee3bd7
commit 16912a4087
3 changed files with 33 additions and 7 deletions

View File

@ -950,15 +950,10 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
const thread = this;
return function() {
// onStep is called with 'this' set to the current frame.
const location = thread.sources.getFrameLocation(this);
// Always continue execution if either:
//
// 1. We are in a source mapped region, but inside a null mapping
// (doesn't correlate to any region of source)
// 2. The source we are in is black boxed.
if (location.url == null || thread.sources.isBlackBoxed(location.url)) {
// Continue if the source is black boxed.
if (thread.sources.isBlackBoxed(location.url)) {
return undefined;
}

View File

@ -0,0 +1,30 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-disable no-shadow */
"use strict";
/**
* Check basic stepping for console evaluations.
*/
add_task(
threadFrontTest(async ({ threadFront, targetFront, debuggee }) => {
dumpn("Evaluating test code and waiting for first debugger statement");
const consoleFront = await targetFront.getFront("console");
consoleFront.evaluateJSAsync(
`(function(){
debugger;
var a = 1;
var b = 2;
})();`
);
await waitForEvent(threadFront, "paused");
await threadFront.stepOver();
const packet = await waitForEvent(threadFront, "paused");
Assert.equal(packet.frame.where.line, 3, "step to line 3");
await threadFront.resume();
})
);

View File

@ -189,6 +189,7 @@ skip-if = true # breakpoint sliding is not supported bug 1525685
[test_stepping-08.js]
[test_stepping-09.js]
[test_stepping-10.js]
[test_stepping-11.js]
[test_stepping-with-skip-breakpoints.js]
[test_framebindings-01.js]
[test_framebindings-02.js]