Skip to content

Commit

Permalink
[DevTools] call setScriptSource callback right after editing
Browse files Browse the repository at this point in the history
Frontend should have time to restore breakpoints before stepInto call.

BUG=none
[email protected]

Review-Url: https://codereview.chromium.org/2552923002
Cr-Commit-Position: refs/heads/master@{#436507}
  • Loading branch information
alexkozy authored and Commit bot committed Dec 6, 2016
1 parent 1affe9b commit 8baafa7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions front_end/sdk/DebuggerModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,9 @@ SDK.DebuggerModel = class extends SDK.SDKModel {
callFrames,
asyncStackTrace,
needsStepIn) {
callback(error, exceptionDetails);
if (needsStepIn) {
this.stepInto();
this._pendingLiveEditCallback = callback.bind(this, error, exceptionDetails);
return;
}

Expand All @@ -387,7 +387,6 @@ SDK.DebuggerModel = class extends SDK.SDKModel {
callFrames, this._debuggerPausedDetails.reason, this._debuggerPausedDetails.auxData,
this._debuggerPausedDetails.breakpointIds, asyncStackTrace);
}
callback(error, exceptionDetails);
}

/**
Expand Down Expand Up @@ -435,15 +434,8 @@ SDK.DebuggerModel = class extends SDK.SDKModel {
_pausedScript(callFrames, reason, auxData, breakpointIds, asyncStackTrace) {
var pausedDetails =
new SDK.DebuggerPausedDetails(this, callFrames, reason, auxData, breakpointIds, asyncStackTrace);
if (this._setDebuggerPausedDetails(pausedDetails)) {
if (this._pendingLiveEditCallback) {
var callback = this._pendingLiveEditCallback;
delete this._pendingLiveEditCallback;
callback();
}
} else {
if (!this._setDebuggerPausedDetails(pausedDetails))
this._agent.stepInto();
}
}

_resumedScript() {
Expand Down

0 comments on commit 8baafa7

Please sign in to comment.