| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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; |
| OLD | NEW |