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

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

Issue 2931143003: DevTools: make debugger's rawLocationToUILocation return nullable type (Closed)
Patch Set: add test Created 3 years, 6 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
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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 */ 855 */
856 _prepareScopeVariables(callFrame, properties, internalProperties) { 856 _prepareScopeVariables(callFrame, properties, internalProperties) {
857 if (!properties || !properties.length || properties.length > 500 || !this.is Showing()) { 857 if (!properties || !properties.length || properties.length > 500 || !this.is Showing()) {
858 this._clearValueWidgets(); 858 this._clearValueWidgets();
859 return; 859 return;
860 } 860 }
861 861
862 var functionUILocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILo cation( 862 var functionUILocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILo cation(
863 /** @type {!SDK.DebuggerModel.Location} */ (callFrame.functionLocation() )); 863 /** @type {!SDK.DebuggerModel.Location} */ (callFrame.functionLocation() ));
864 var executionUILocation = Bindings.debuggerWorkspaceBinding.rawLocationToUIL ocation(callFrame.location()); 864 var executionUILocation = Bindings.debuggerWorkspaceBinding.rawLocationToUIL ocation(callFrame.location());
865 if (functionUILocation.uiSourceCode !== this._debuggerSourceCode || 865 if (!functionUILocation || !executionUILocation || functionUILocation.uiSour ceCode !== this._debuggerSourceCode ||
866 executionUILocation.uiSourceCode !== this._debuggerSourceCode) { 866 executionUILocation.uiSourceCode !== this._debuggerSourceCode) {
867 this._clearValueWidgets(); 867 this._clearValueWidgets();
868 return; 868 return;
869 } 869 }
870 870
871 var fromLine = functionUILocation.lineNumber; 871 var fromLine = functionUILocation.lineNumber;
872 var fromColumn = functionUILocation.columnNumber; 872 var fromColumn = functionUILocation.columnNumber;
873 var toLine = executionUILocation.lineNumber; 873 var toLine = executionUILocation.lineNumber;
874 874
875 // Make sure we have a chance to update all existing widgets. 875 // Make sure we have a chance to update all existing widgets.
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 return; 1679 return;
1680 this.bookmark.clear(); 1680 this.bookmark.clear();
1681 this.bookmark = null; 1681 this.bookmark = null;
1682 } 1682 }
1683 }; 1683 };
1684 1684
1685 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book mark'); 1685 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book mark');
1686 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo l('element'); 1686 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo l('element');
1687 1687
1688 Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol = Symbol('bookm ark'); 1688 Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol = Symbol('bookm ark');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698