Commit 0d7737c7 authored by Aleksey Kozyatinskiy's avatar Aleksey Kozyatinskiy Committed by Commit Bot

Revert "[DevTools] removed Breakpoint._currentState"

This reverts commit 9c39f918.

Reason for revert: break breakpoint in minified sources.

Original change's description:
> [DevTools] removed Breakpoint._currentState
> 
> Current state on breakpoint shared between different models is hack
> that should never work.
> 
> R=​lushnikov@chromium.org
> 
> Bug: none
> Change-Id: I60a0e5774c47c38a0f5f251f9e9d5f2437ceb9b4
> Reviewed-on: https://chromium-review.googlesource.com/1179262
> Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
> Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#583934}

TBR=lushnikov@chromium.org,kozyatinskiy@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: none
Change-Id: Id6a170405c0d07658ff5741142dc2b35b7f89c6b
Reviewed-on: https://chromium-review.googlesource.com/c/1281688Reviewed-by: default avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599774}
parent 3929b82e
...@@ -305,6 +305,7 @@ Bindings.BreakpointManager.Breakpoint = class { ...@@ -305,6 +305,7 @@ Bindings.BreakpointManager.Breakpoint = class {
/** @type {boolean} */ this._enabled; /** @type {boolean} */ this._enabled;
/** @type {boolean} */ this._isRemoved; /** @type {boolean} */ this._isRemoved;
this._currentState = null;
/** @type {!Map.<!SDK.DebuggerModel, !Bindings.BreakpointManager.ModelBreakpoint>}*/ /** @type {!Map.<!SDK.DebuggerModel, !Bindings.BreakpointManager.ModelBreakpoint>}*/
this._modelBreakpoints = new Map(); this._modelBreakpoints = new Map();
this._updateState(condition, enabled); this._updateState(condition, enabled);
...@@ -578,6 +579,10 @@ Bindings.BreakpointManager.ModelBreakpoint = class { ...@@ -578,6 +579,10 @@ Bindings.BreakpointManager.ModelBreakpoint = class {
newState = new Bindings.BreakpointManager.Breakpoint.State( newState = new Bindings.BreakpointManager.Breakpoint.State(
null, script.scriptId, script.hash, debuggerLocation.lineNumber, debuggerLocation.columnNumber, condition); null, script.scriptId, script.hash, debuggerLocation.lineNumber, debuggerLocation.columnNumber, condition);
} }
} else if (this._breakpoint._currentState && this._breakpoint._currentState.url) {
const position = this._breakpoint._currentState;
newState = new Bindings.BreakpointManager.Breakpoint.State(
position.url, null, null, position.lineNumber, position.columnNumber, condition);
} else if (uiSourceCode) { } else if (uiSourceCode) {
newState = new Bindings.BreakpointManager.Breakpoint.State( newState = new Bindings.BreakpointManager.Breakpoint.State(
uiSourceCode.url(), null, null, lineNumber, columnNumber, condition); uiSourceCode.url(), null, null, lineNumber, columnNumber, condition);
...@@ -587,6 +592,8 @@ Bindings.BreakpointManager.ModelBreakpoint = class { ...@@ -587,6 +592,8 @@ Bindings.BreakpointManager.ModelBreakpoint = class {
return; return;
} }
this._breakpoint._currentState = newState;
if (this._debuggerId) { if (this._debuggerId) {
await this._refreshBreakpoint(); await this._refreshBreakpoint();
callback(); callback();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment