| Index: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| index 265139b8b5ed9b1381d9e6a67942c229eb092e6c..70b25355bdb930d07f08cb3dc0e10fa89ffe23ce 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
|
| @@ -595,9 +595,15 @@ Sources.JavaScriptSourceFrame = class extends SourceFrame.UISourceCodeFrame {
|
| var callFrame = UI.context.flavor(SDK.DebuggerModel.CallFrame);
|
| if (!callFrame)
|
| return;
|
| + if (this._clearContinueToLocationsTimer) {
|
| + clearTimeout(this._clearContinueToLocationsTimer);
|
| + delete this._clearContinueToLocationsTimer;
|
| + }
|
| var localScope = callFrame.localScope();
|
| - if (!localScope)
|
| + if (!localScope) {
|
| + this.textEditor.operation(clearExistingLocations.bind(this));
|
| return;
|
| + }
|
| var start = localScope.startLocation();
|
| var end = localScope.endLocation();
|
| var debuggerModel = callFrame.debuggerModel;
|
| @@ -605,20 +611,12 @@ Sources.JavaScriptSourceFrame = class extends SourceFrame.UISourceCodeFrame {
|
| debuggerModel.getPossibleBreakpoints(start, end, true)
|
| .then(locations => this.textEditor.operation(renderLocations.bind(this, locations)));
|
|
|
| - if (this._clearContinueToLocationsTimer) {
|
| - clearTimeout(this._clearContinueToLocationsTimer);
|
| - delete this._clearContinueToLocationsTimer;
|
| - }
|
| -
|
| /**
|
| * @param {!Array<!SDK.DebuggerModel.BreakLocation>} locations
|
| * @this {Sources.JavaScriptSourceFrame}
|
| */
|
| function renderLocations(locations) {
|
| - var bookmarks = this.textEditor.bookmarks(
|
| - this.textEditor.fullRange(), Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol);
|
| - bookmarks.map(bookmark => bookmark.clear());
|
| -
|
| + clearExistingLocations.call(this);
|
| for (var location of locations) {
|
| var icon;
|
| var isCurrent = location.lineNumber === executionLocation.lineNumber &&
|
| @@ -648,6 +646,15 @@ Sources.JavaScriptSourceFrame = class extends SourceFrame.UISourceCodeFrame {
|
| }
|
|
|
| /**
|
| + * @this {Sources.JavaScriptSourceFrame}
|
| + */
|
| + function clearExistingLocations() {
|
| + var bookmarks = this.textEditor.bookmarks(
|
| + this.textEditor.fullRange(), Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol);
|
| + bookmarks.map(bookmark => bookmark.clear());
|
| + }
|
| +
|
| + /**
|
| * @param {!Event} event
|
| * @this {Sources.JavaScriptSourceFrame}
|
| */
|
|
|