| 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.loadSourceMap(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      * @param {string} url | 324      * @param {string} url | 
| 322      * @return {string} | 325      * @return {string} | 
| 323      */ | 326      */ | 
| 324     _urlToRegExpString: function(url) | 327     _urlToRegExpString: function(url) | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
| 344             if (scheme === "chrome-extension") | 347             if (scheme === "chrome-extension") | 
| 345                 prefix += parsedURL.host + "\\b"; | 348                 prefix += parsedURL.host + "\\b"; | 
| 346             prefix += ".*"; | 349             prefix += ".*"; | 
| 347         } | 350         } | 
| 348         return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\
     b"); | 351         return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\
     b"); | 
| 349     } | 352     } | 
| 350 } | 353 } | 
| 351 | 354 | 
| 352 /** @type {!WebInspector.BlackboxManager} */ | 355 /** @type {!WebInspector.BlackboxManager} */ | 
| 353 WebInspector.blackboxManager; | 356 WebInspector.blackboxManager; | 
| OLD | NEW | 
|---|