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 * @implements {SDK.TargetManager.Observer} | 5 * @implements {SDK.TargetManager.Observer} |
6 * @unrestricted | 6 * @unrestricted |
7 */ | 7 */ |
8 Bindings.BlackboxManager = class { | 8 Bindings.BlackboxManager = class { |
9 /** | 9 /** |
10 * @param {!Bindings.DebuggerWorkspaceBinding} debuggerWorkspaceBinding | 10 * @param {!Bindings.DebuggerWorkspaceBinding} debuggerWorkspaceBinding |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 _parsedScriptSource(event) { | 315 _parsedScriptSource(event) { |
316 var script = /** @type {!SDK.Script} */ (event.data); | 316 var script = /** @type {!SDK.Script} */ (event.data); |
317 this._addScript(script); | 317 this._addScript(script); |
318 } | 318 } |
319 | 319 |
320 /** | 320 /** |
321 * @param {!SDK.Script} script | 321 * @param {!SDK.Script} script |
322 * @return {!Promise<undefined>} | 322 * @return {!Promise<undefined>} |
323 */ | 323 */ |
324 _addScript(script) { | 324 _addScript(script) { |
| 325 if (!script.sourceURL && !script.sourceMapURL) |
| 326 return Promise.resolve(); |
325 var blackboxed = this._isBlackboxedScript(script); | 327 var blackboxed = this._isBlackboxedScript(script); |
326 return this._setScriptState(script, blackboxed ? [{lineNumber: 0, columnNumb
er: 0}] : []); | 328 return this._setScriptState(script, blackboxed ? [{lineNumber: 0, columnNumb
er: 0}] : []); |
327 } | 329 } |
328 | 330 |
329 /** | 331 /** |
330 * @param {!SDK.Script} script | 332 * @param {!SDK.Script} script |
331 * @return {boolean} | 333 * @return {boolean} |
332 */ | 334 */ |
333 _isBlackboxedScript(script) { | 335 _isBlackboxedScript(script) { |
334 return this.isBlackboxedURL(script.sourceURL, script.isContentScript()); | 336 return this.isBlackboxedURL(script.sourceURL, script.isContentScript()); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 if (scheme === 'chrome-extension') | 425 if (scheme === 'chrome-extension') |
424 prefix += parsedURL.host + '\\b'; | 426 prefix += parsedURL.host + '\\b'; |
425 prefix += '.*'; | 427 prefix += '.*'; |
426 } | 428 } |
427 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? '$' : '\\b'); | 429 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? '$' : '\\b'); |
428 } | 430 } |
429 }; | 431 }; |
430 | 432 |
431 /** @type {!Bindings.BlackboxManager} */ | 433 /** @type {!Bindings.BlackboxManager} */ |
432 Bindings.blackboxManager; | 434 Bindings.blackboxManager; |
OLD | NEW |