mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
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:
parent
4fefee3bd7
commit
16912a4087
@ -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;
|
||||
}
|
||||
|
||||
|
30
devtools/server/tests/unit/test_stepping-11.js
Normal file
30
devtools/server/tests/unit/test_stepping-11.js
Normal 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();
|
||||
})
|
||||
);
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user