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

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

Issue 2795193003: DevTools: carefully cleanup script UISourceCodes (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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 Common.moduleSetting('skipStackFramesPattern').setAsArray(regexPatterns); 269 Common.moduleSetting('skipStackFramesPattern').setAsArray(regexPatterns);
270 } 270 }
271 271
272 _patternChanged() { 272 _patternChanged() {
273 this._isBlackboxedURLCache.clear(); 273 this._isBlackboxedURLCache.clear();
274 274
275 /** @type {!Array<!Promise>} */ 275 /** @type {!Array<!Promise>} */
276 var promises = []; 276 var promises = [];
277 for (var debuggerModel of SDK.targetManager.models(SDK.DebuggerModel)) { 277 for (var debuggerModel of SDK.targetManager.models(SDK.DebuggerModel)) {
278 promises.push(this._setBlackboxPatterns(debuggerModel)); 278 promises.push(this._setBlackboxPatterns(debuggerModel));
279 for (var scriptId in debuggerModel.scripts) { 279 for (var script of debuggerModel.scripts())
280 var script = debuggerModel.scripts[scriptId];
281 promises.push(this._addScript(script).then(loadSourceMap.bind(this, scri pt))); 280 promises.push(this._addScript(script).then(loadSourceMap.bind(this, scri pt)));
282 }
283 } 281 }
284 Promise.all(promises).then(() => { 282 Promise.all(promises).then(() => {
285 var listeners = Array.from(this._listeners); 283 var listeners = Array.from(this._listeners);
286 for (var listener of listeners) 284 for (var listener of listeners)
287 listener(); 285 listener();
288 this._patternChangeFinishedForTests(); 286 this._patternChangeFinishedForTests();
289 }); 287 });
290 288
291 /** 289 /**
292 * @param {!SDK.Script} script 290 * @param {!SDK.Script} script
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (scheme === 'chrome-extension') 425 if (scheme === 'chrome-extension')
428 prefix += parsedURL.host + '\\b'; 426 prefix += parsedURL.host + '\\b';
429 prefix += '.*'; 427 prefix += '.*';
430 } 428 }
431 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? '$' : '\\b'); 429 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? '$' : '\\b');
432 } 430 }
433 }; 431 };
434 432
435 /** @type {!Bindings.BlackboxManager} */ 433 /** @type {!Bindings.BlackboxManager} */
436 Bindings.blackboxManager; 434 Bindings.blackboxManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698