Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/devtools/server/actors/thread.js b/devtools/server/actors/thread.js
- index 6deee45..b711d83 100644
- --- a/devtools/server/actors/thread.js
- +++ b/devtools/server/actors/thread.js
- @@ -425,10 +425,11 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
- const result = function(completion) {
- // onPop is called with 'this' set to the current frame.
- const generatedLocation = thread.sources.getFrameLocation(this);
- - const { originalSourceActor } = thread.unsafeSynchronize(
- + const originalLocation = thread.unsafeSynchronize(
- thread.sources.getOriginalLocation(generatedLocation)
- );
- -
- +
- + const { originalSourceActor } = originalLocation;
- const url = originalSourceActor.url;
- if (thread.sources.isBlackBoxed(url)) {
- @@ -438,21 +439,14 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
- // Note that we're popping this frame; we need to watch for
- // subsequent step events on its caller.
- this.reportedPop = true;
- -
- - return pauseAndRespond(this, packet => {
- - packet.why.frameFinished = {};
- - if (!completion) {
- - packet.why.frameFinished.terminated = true;
- - } else if (completion.hasOwnProperty("return")) {
- - packet.why.frameFinished.return = createValueGripHook(completion.return);
- - } else if (completion.hasOwnProperty("yield")) {
- - packet.why.frameFinished.return = createValueGripHook(completion.yield);
- - } else {
- - packet.why.frameFinished.throw = createValueGripHook(completion.throw);
- - }
- - return packet;
- - });
- - };
- + const parentFrame = thread._getNextStepFrame(this);
- + if (parentFrame && parentFrame.script) {
- + const generatedLocation = thread.sources.getFrameLocation(parentFrame);
- + const { onStep } = thread._makeSteppingHooks(originalLocation, "next", parentFrame);
- + parentFrame.onStep = onStep
- + return undefined;
- + }
- + }
- // When stepping out, we don't want to stop at a breakpoint that
- // happened to be set exactly at the spot where we stepped out.
- @@ -560,7 +554,7 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
- /**
- * Define the JS hook functions for stepping.
- */
- - _makeSteppingHooks: function(startLocation, steppingType) {
- + _makeSteppingHooks: function(startLocation, steppingType, startFrame) {
- // Bind these methods and state because some of the hooks are called
- // with 'this' set to the current frame. Rather than repeating the
- // binding in each _makeOnX method, just do it once here and pass it
- @@ -573,7 +567,7 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
- ),
- createValueGrip: v => createValueGrip(v, this._pausePool, this.objectGrip),
- thread: this,
- - startFrame: this.youngestFrame,
- + startFrame: startFrame || this.youngestFrame,
- startLocation: startLocation,
- steppingType: steppingType
- };
Add Comment
Please, Sign In to add comment