Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 2742653003: [DevTools] chaotic green dots displacement fix (Closed)
Patch Set: git branch Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 } 588 }
589 } 589 }
590 590
591 _showContinueToLocations() { 591 _showContinueToLocations() {
592 var executionContext = UI.context.flavor(SDK.ExecutionContext); 592 var executionContext = UI.context.flavor(SDK.ExecutionContext);
593 if (!executionContext) 593 if (!executionContext)
594 return; 594 return;
595 var callFrame = UI.context.flavor(SDK.DebuggerModel.CallFrame); 595 var callFrame = UI.context.flavor(SDK.DebuggerModel.CallFrame);
596 if (!callFrame) 596 if (!callFrame)
597 return; 597 return;
598 if (this._clearContinueToLocationsTimer) {
599 clearTimeout(this._clearContinueToLocationsTimer);
600 delete this._clearContinueToLocationsTimer;
601 }
lushnikov 2017/03/10 04:51:57 Why don't we want greendots to be removed in case
kozy 2017/03/10 05:06:38 Let me explain. When we clearExecutionLine we sche
598 var localScope = callFrame.localScope(); 602 var localScope = callFrame.localScope();
599 if (!localScope) 603 if (!localScope)
600 return; 604 return;
601 var start = localScope.startLocation(); 605 var start = localScope.startLocation();
602 var end = localScope.endLocation(); 606 var end = localScope.endLocation();
603 var debuggerModel = callFrame.debuggerModel; 607 var debuggerModel = callFrame.debuggerModel;
604 var executionLocation = callFrame.location(); 608 var executionLocation = callFrame.location();
605 debuggerModel.getPossibleBreakpoints(start, end, true) 609 debuggerModel.getPossibleBreakpoints(start, end, true)
606 .then(locations => this.textEditor.operation(renderLocations.bind(this, locations))); 610 .then(locations => this.textEditor.operation(renderLocations.bind(this, locations)));
607 611
608 if (this._clearContinueToLocationsTimer) {
609 clearTimeout(this._clearContinueToLocationsTimer);
610 delete this._clearContinueToLocationsTimer;
611 }
612
613 /** 612 /**
614 * @param {!Array<!SDK.DebuggerModel.BreakLocation>} locations 613 * @param {!Array<!SDK.DebuggerModel.BreakLocation>} locations
615 * @this {Sources.JavaScriptSourceFrame} 614 * @this {Sources.JavaScriptSourceFrame}
616 */ 615 */
617 function renderLocations(locations) { 616 function renderLocations(locations) {
618 var bookmarks = this.textEditor.bookmarks( 617 var bookmarks = this.textEditor.bookmarks(
619 this.textEditor.fullRange(), Sources.JavaScriptSourceFrame.continueToL ocationDecorationSymbol); 618 this.textEditor.fullRange(), Sources.JavaScriptSourceFrame.continueToL ocationDecorationSymbol);
620 bookmarks.map(bookmark => bookmark.clear()); 619 bookmarks.map(bookmark => bookmark.clear());
621 620
622 for (var location of locations) { 621 for (var location of locations) {
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 return; 1462 return;
1464 this.bookmark.clear(); 1463 this.bookmark.clear();
1465 this.bookmark = null; 1464 this.bookmark = null;
1466 } 1465 }
1467 }; 1466 };
1468 1467
1469 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book mark'); 1468 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book mark');
1470 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo l('element'); 1469 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo l('element');
1471 1470
1472 Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol = Symbol('bookm ark'); 1471 Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol = Symbol('bookm ark');
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698