From 8baafa74ba522afc492e2b923a965e7ebc3a2b0d Mon Sep 17 00:00:00 2001 From: kozyatinskiy Date: Mon, 5 Dec 2016 19:18:21 -0800 Subject: [PATCH] [DevTools] call setScriptSource callback right after editing Frontend should have time to restore breakpoints before stepInto call. BUG=none R=dgozman@chromium.org Review-Url: https://codereview.chromium.org/2552923002 Cr-Commit-Position: refs/heads/master@{#436507} --- front_end/sdk/DebuggerModel.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/front_end/sdk/DebuggerModel.js b/front_end/sdk/DebuggerModel.js index 788c5dd790..7312c980c7 100644 --- a/front_end/sdk/DebuggerModel.js +++ b/front_end/sdk/DebuggerModel.js @@ -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; } @@ -387,7 +387,6 @@ SDK.DebuggerModel = class extends SDK.SDKModel { callFrames, this._debuggerPausedDetails.reason, this._debuggerPausedDetails.auxData, this._debuggerPausedDetails.breakpointIds, asyncStackTrace); } - callback(error, exceptionDetails); } /** @@ -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() {