| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
r(listener, thisObject); | 42 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene
r(listener, thisObject); |
| 43 }, | 43 }, |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * @param {!WebInspector.DebuggerModel.Location} location | 46 * @param {!WebInspector.DebuggerModel.Location} location |
| 47 * @return {boolean} | 47 * @return {boolean} |
| 48 */ | 48 */ |
| 49 isBlackboxedRawLocation: function(location) | 49 isBlackboxedRawLocation: function(location) |
| 50 { | 50 { |
| 51 if (!this._scriptIdToPositions.has(location.scriptId)) | 51 if (!this._scriptIdToPositions.has(location.scriptId)) |
| 52 return false; | 52 return this._isBlackboxedScript(location.script()); |
| 53 var positions = this._scriptIdToPositions.get(location.scriptId); | 53 var positions = this._scriptIdToPositions.get(location.scriptId); |
| 54 var index = positions.lowerBound(location, comparator); | 54 var index = positions.lowerBound(location, comparator); |
| 55 return !!(index % 2); | 55 return !!(index % 2); |
| 56 | 56 |
| 57 /** | 57 /** |
| 58 * @param {!WebInspector.DebuggerModel.Location} a | 58 * @param {!WebInspector.DebuggerModel.Location} a |
| 59 * @param {!DebuggerAgent.ScriptPosition} b | 59 * @param {!DebuggerAgent.ScriptPosition} b |
| 60 * @return {number} | 60 * @return {number} |
| 61 */ | 61 */ |
| 62 function comparator(a, b) | 62 function comparator(a, b) |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 305 |
| 306 /** | 306 /** |
| 307 * @param {boolean} success | 307 * @param {boolean} success |
| 308 * @this {WebInspector.BlackboxManager} | 308 * @this {WebInspector.BlackboxManager} |
| 309 */ | 309 */ |
| 310 function updateState(success) | 310 function updateState(success) |
| 311 { | 311 { |
| 312 if (success) { | 312 if (success) { |
| 313 this._scriptIdToPositions.set(script.scriptId, positions); | 313 this._scriptIdToPositions.set(script.scriptId, positions); |
| 314 this._debuggerWorkspaceBinding.updateLocations(script); | 314 this._debuggerWorkspaceBinding.updateLocations(script); |
| 315 var isBlackboxed = positions.length !== 0; |
| 316 if (!isBlackboxed && script.sourceMapURL) |
| 317 this._debuggerWorkspaceBinding.maybeLoadSourceMap(script); |
| 315 } else if (!this._scriptIdToPositions.has(script.scriptId)) { | 318 } else if (!this._scriptIdToPositions.has(script.scriptId)) { |
| 316 this._scriptIdToPositions.set(script.scriptId, []); | 319 this._scriptIdToPositions.set(script.scriptId, []); |
| 317 } | 320 } |
| 318 } | 321 } |
| 319 }, | 322 }, |
| 320 | 323 |
| 321 /** | 324 /** |
| 322 * @param {string} url | 325 * @param {string} url |
| 323 * @return {string} | 326 * @return {string} |
| 324 */ | 327 */ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 345 if (scheme === "chrome-extension") | 348 if (scheme === "chrome-extension") |
| 346 prefix += parsedURL.host + "\\b"; | 349 prefix += parsedURL.host + "\\b"; |
| 347 prefix += ".*"; | 350 prefix += ".*"; |
| 348 } | 351 } |
| 349 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\
b"); | 352 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\
b"); |
| 350 } | 353 } |
| 351 } | 354 } |
| 352 | 355 |
| 353 /** @type {!WebInspector.BlackboxManager} */ | 356 /** @type {!WebInspector.BlackboxManager} */ |
| 354 WebInspector.blackboxManager; | 357 WebInspector.blackboxManager; |
| OLD | NEW |