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

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

Issue 1688283002: [DevTools] Blackboxing in LiveLocations is supported in Linkifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-source-map-support-v3
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 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 )
11 { 11 {
12 this._debuggerWorkspaceBinding = debuggerWorkspaceBinding; 12 this._debuggerWorkspaceBinding = debuggerWorkspaceBinding;
13 this._networkMapping = networkMapping; 13 this._networkMapping = networkMapping;
14 14
15 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI nspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this ); 15 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI nspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this );
16 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI nspector.DebuggerModel.Events.GlobalObjectCleared, this._globalObjectCleared, th is); 16 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI nspector.DebuggerModel.Events.GlobalObjectCleared, this._globalObjectCleared, th is);
17 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this. _patternChanged.bind(this)); 17 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this. _patternChanged.bind(this));
18 WebInspector.moduleSetting("skipContentScripts").addChangeListener(this._pat ternChanged.bind(this)); 18 WebInspector.moduleSetting("skipContentScripts").addChangeListener(this._pat ternChanged.bind(this));
19 19
20 /** @type {!Map<string, !Array<!DebuggerAgent.ScriptPosition>>} */ 20 /** @type {!Map<string, !Array<!DebuggerAgent.ScriptPosition>>} */
21 this._scriptIdToPositions = new Map(); 21 this._scriptIdToPositions = new Map();
22 /** @type {!Map<string, boolean>} */ 22 /** @type {!Map<string, boolean>} */
23 this._isBlackboxedURLCache = new Map(); 23 this._isBlackboxedURLCache = new Map();
24 } 24 }
25 25
26 WebInspector.BlackboxManager.prototype = { 26 WebInspector.BlackboxManager.prototype = {
27
28 /** 27 /**
29 * @param {function(!WebInspector.Event)} listener 28 * @param {function(!WebInspector.Event)} listener
30 * @param {!Object=} thisObject 29 * @param {!Object=} thisObject
31 */ 30 */
32 addChangeListener: function(listener, thisObject) 31 addChangeListener: function(listener, thisObject)
33 { 32 {
34 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(l istener, thisObject); 33 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(l istener, thisObject);
35 }, 34 },
36 35
37 /** 36 /**
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 302 }
304 303
305 return script.setBlackboxedRanges(positions).then(updateState.bind(this) ); 304 return script.setBlackboxedRanges(positions).then(updateState.bind(this) );
306 305
307 /** 306 /**
308 * @param {boolean} success 307 * @param {boolean} success
309 * @this {WebInspector.BlackboxManager} 308 * @this {WebInspector.BlackboxManager}
310 */ 309 */
311 function updateState(success) 310 function updateState(success)
312 { 311 {
313 if (success) 312 if (success) {
314 this._scriptIdToPositions.set(script.scriptId, positions); 313 this._scriptIdToPositions.set(script.scriptId, positions);
315 else if (!this._scriptIdToPositions.has(script.scriptId)) 314 this._debuggerWorkspaceBinding.updateLocations(script);
315 } else if (!this._scriptIdToPositions.has(script.scriptId)) {
316 this._scriptIdToPositions.set(script.scriptId, []); 316 this._scriptIdToPositions.set(script.scriptId, []);
317 }
317 } 318 }
318 }, 319 },
319 320
320 /** 321 /**
321 * @param {string} url 322 * @param {string} url
322 * @return {string} 323 * @return {string}
323 */ 324 */
324 _urlToRegExpString: function(url) 325 _urlToRegExpString: function(url)
325 { 326 {
326 var parsedURL = new WebInspector.ParsedURL(url); 327 var parsedURL = new WebInspector.ParsedURL(url);
(...skipping 17 matching lines...) Expand all
344 if (scheme === "chrome-extension") 345 if (scheme === "chrome-extension")
345 prefix += parsedURL.host + "\\b"; 346 prefix += parsedURL.host + "\\b";
346 prefix += ".*"; 347 prefix += ".*";
347 } 348 }
348 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\ b"); 349 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\ b");
349 } 350 }
350 } 351 }
351 352
352 /** @type {!WebInspector.BlackboxManager} */ 353 /** @type {!WebInspector.BlackboxManager} */
353 WebInspector.blackboxManager; 354 WebInspector.blackboxManager;
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698