Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js

Issue 2784413003: DevTools: carefully cleanup javascript sourcemaps (Closed)
Patch Set: address comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * @unrestricted 5 * @unrestricted
6 * @implements {SDK.SDKModelObserver<!SDK.DebuggerModel>} 6 * @implements {SDK.SDKModelObserver<!SDK.DebuggerModel>}
7 */ 7 */
8 Bindings.BlackboxManager = class { 8 Bindings.BlackboxManager = class {
9 /** 9 /**
10 * @param {!Bindings.DebuggerWorkspaceBinding} debuggerWorkspaceBinding 10 * @param {!Bindings.DebuggerWorkspaceBinding} debuggerWorkspaceBinding
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (isContentScript && Common.moduleSetting('skipContentScripts').get()) 125 if (isContentScript && Common.moduleSetting('skipContentScripts').get())
126 return true; 126 return true;
127 var regex = Common.moduleSetting('skipStackFramesPattern').asRegExp(); 127 var regex = Common.moduleSetting('skipStackFramesPattern').asRegExp();
128 var isBlackboxed = regex && regex.test(url); 128 var isBlackboxed = regex && regex.test(url);
129 this._isBlackboxedURLCache.set(url, isBlackboxed); 129 this._isBlackboxedURLCache.set(url, isBlackboxed);
130 return isBlackboxed; 130 return isBlackboxed;
131 } 131 }
132 132
133 /** 133 /**
134 * @param {!SDK.Script} script 134 * @param {!SDK.Script} script
135 * @param {?SDK.TextSourceMap} sourceMap 135 * @param {?SDK.SourceMap} sourceMap
136 * @return {!Promise<undefined>} 136 * @return {!Promise<undefined>}
137 */ 137 */
138 sourceMapLoaded(script, sourceMap) { 138 sourceMapLoaded(script, sourceMap) {
139 if (!sourceMap) 139 if (!sourceMap)
140 return Promise.resolve(); 140 return Promise.resolve();
141 var previousScriptState = this._scriptPositions(script); 141 var previousScriptState = this._scriptPositions(script);
142 if (!previousScriptState) 142 if (!previousScriptState)
143 return Promise.resolve(); 143 return Promise.resolve();
144 144
145 var hasBlackboxedMappings = sourceMap.sourceURLs().some(url => this.isBlackb oxedURL(url)); 145 var hasBlackboxedMappings = sourceMap.sourceURLs().some(url => this.isBlackb oxedURL(url));
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (scheme === 'chrome-extension') 427 if (scheme === 'chrome-extension')
428 prefix += parsedURL.host + '\\b'; 428 prefix += parsedURL.host + '\\b';
429 prefix += '.*'; 429 prefix += '.*';
430 } 430 }
431 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? '$' : '\\b'); 431 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? '$' : '\\b');
432 } 432 }
433 }; 433 };
434 434
435 /** @type {!Bindings.BlackboxManager} */ 435 /** @type {!Bindings.BlackboxManager} */
436 Bindings.blackboxManager; 436 Bindings.blackboxManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698