| 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 * @implements {WebInspector.TargetManager.Observer} | 9 * @implements {WebInspector.TargetManager.Observer} |
| 10 */ | 10 */ |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 } | 78 } |
| 79 return debuggerModel.setBlackboxPatterns(patterns); | 79 return debuggerModel.setBlackboxPatterns(patterns); |
| 80 }, | 80 }, |
| 81 | 81 |
| 82 /** | 82 /** |
| 83 * @param {!WebInspector.DebuggerModel.Location} location | 83 * @param {!WebInspector.DebuggerModel.Location} location |
| 84 * @return {boolean} | 84 * @return {boolean} |
| 85 */ | 85 */ |
| 86 isBlackboxedRawLocation: function(location) | 86 isBlackboxedRawLocation: function(location) |
| 87 { | 87 { |
| 88 var positions = this._scriptPositions(location.script()); | 88 var script = location.script(); |
| 89 if (!script) |
| 90 return false; |
| 91 var positions = this._scriptPositions(script); |
| 89 if (!positions) | 92 if (!positions) |
| 90 return this._isBlackboxedScript(location.script()); | 93 return this._isBlackboxedScript(script); |
| 91 var index = positions.lowerBound(location, comparator); | 94 var index = positions.lowerBound(location, comparator); |
| 92 return !!(index % 2); | 95 return !!(index % 2); |
| 93 | 96 |
| 94 /** | 97 /** |
| 95 * @param {!WebInspector.DebuggerModel.Location} a | 98 * @param {!WebInspector.DebuggerModel.Location} a |
| 96 * @param {!DebuggerAgent.ScriptPosition} b | 99 * @param {!DebuggerAgent.ScriptPosition} b |
| 97 * @return {number} | 100 * @return {number} |
| 98 */ | 101 */ |
| 99 function comparator(a, b) | 102 function comparator(a, b) |
| 100 { | 103 { |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 if (scheme === "chrome-extension") | 453 if (scheme === "chrome-extension") |
| 451 prefix += parsedURL.host + "\\b"; | 454 prefix += parsedURL.host + "\\b"; |
| 452 prefix += ".*"; | 455 prefix += ".*"; |
| 453 } | 456 } |
| 454 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\
b"); | 457 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\
b"); |
| 455 } | 458 } |
| 456 } | 459 } |
| 457 | 460 |
| 458 /** @type {!WebInspector.BlackboxManager} */ | 461 /** @type {!WebInspector.BlackboxManager} */ |
| 459 WebInspector.blackboxManager; | 462 WebInspector.blackboxManager; |
| OLD | NEW |