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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js

Issue 1837283002: [DevTools] Check mappings.length in BlackboxManager on SourceMap loaded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!WebInspector.DebuggerWorkspaceBinding} debuggerWorkspaceBinding 7 * @param {!WebInspector.DebuggerWorkspaceBinding} debuggerWorkspaceBinding
8 * @param {!WebInspector.NetworkMapping} networkMapping 8 * @param {!WebInspector.NetworkMapping} networkMapping
9 */ 9 */
10 WebInspector.BlackboxManager = function(debuggerWorkspaceBinding, networkMapping ) 10 WebInspector.BlackboxManager = function(debuggerWorkspaceBinding, networkMapping )
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 var previousScriptState = this._scriptPositions(script); 110 var previousScriptState = this._scriptPositions(script);
111 if (!previousScriptState) 111 if (!previousScriptState)
112 return Promise.resolve(); 112 return Promise.resolve();
113 113
114 var mappings = sourceMap.mappings().slice(); 114 var mappings = sourceMap.mappings().slice();
115 mappings.sort(mappingComparator); 115 mappings.sort(mappingComparator);
116 116
117 if (!mappings.length) { 117 if (!mappings.length) {
118 if (previousScriptState.length > 0) 118 if (previousScriptState.length > 0)
119 return this._setScriptState(script, []); 119 return this._setScriptState(script, []);
120 return Promise.resolve();
120 } 121 }
121 122
122 var currentBlackboxed = false; 123 var currentBlackboxed = false;
123 var isBlackboxed = false; 124 var isBlackboxed = false;
124 var positions = []; 125 var positions = [];
125 // If content in script file begin is not mapped and one or more ranges are blackboxed then blackbox it. 126 // If content in script file begin is not mapped and one or more ranges are blackboxed then blackbox it.
126 if (mappings[0].lineNumber !== 0 || mappings[0].columnNumber !== 0) { 127 if (mappings[0].lineNumber !== 0 || mappings[0].columnNumber !== 0) {
127 positions.push({ line: 0, column: 0}); 128 positions.push({ line: 0, column: 0});
128 currentBlackboxed = true; 129 currentBlackboxed = true;
129 } 130 }
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 if (scheme === "chrome-extension") 412 if (scheme === "chrome-extension")
412 prefix += parsedURL.host + "\\b"; 413 prefix += parsedURL.host + "\\b";
413 prefix += ".*"; 414 prefix += ".*";
414 } 415 }
415 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\ b"); 416 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\ b");
416 } 417 }
417 } 418 }
418 419
419 /** @type {!WebInspector.BlackboxManager} */ 420 /** @type {!WebInspector.BlackboxManager} */
420 WebInspector.blackboxManager; 421 WebInspector.blackboxManager;
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