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

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

Issue 1699183003: [DevTools] Don't load sourcemap for blackboxed scripts (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js b/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
index f542c5927c7d9c34ddf6e0b9c359426a8b39373e..b1465735e3b66c0d4486e3e1db72ab551de43e45 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
@@ -49,7 +49,7 @@ WebInspector.BlackboxManager.prototype = {
isBlackboxedRawLocation: function(location)
{
if (!this._scriptIdToPositions.has(location.scriptId))
- return false;
+ return this._isBlackboxedScript(location.script());
var positions = this._scriptIdToPositions.get(location.scriptId);
var index = positions.lowerBound(location, comparator);
return !!(index % 2);
@@ -84,12 +84,15 @@ WebInspector.BlackboxManager.prototype = {
/**
* @param {string} url
+ * @param {boolean=} isContentScript
* @return {boolean}
*/
- isBlackboxedURL: function(url)
+ isBlackboxedURL: function(url, isContentScript)
{
if (this._isBlackboxedURLCache.has(url))
return !!this._isBlackboxedURLCache.get(url);
+ if (isContentScript && WebInspector.moduleSetting("skipContentScripts").get())
+ return true;
var regex = WebInspector.moduleSetting("skipStackFramesPattern").asRegExp();
var isBlackboxed = regex && regex.test(url);
this._isBlackboxedURLCache.set(url, isBlackboxed);
@@ -274,9 +277,7 @@ WebInspector.BlackboxManager.prototype = {
*/
_isBlackboxedScript: function(script)
{
- if (script.isContentScript() && WebInspector.moduleSetting("skipContentScripts").get())
- return true;
- return this.isBlackboxedURL(script.sourceURL);
+ return this.isBlackboxedURL(script.sourceURL, script.isContentScript());
},
/**
@@ -310,6 +311,9 @@ WebInspector.BlackboxManager.prototype = {
if (success) {
this._scriptIdToPositions.set(script.scriptId, positions);
this._debuggerWorkspaceBinding.updateLocations(script);
+ var isBlackboxed = positions.length !== 0;
+ if (!isBlackboxed && script.sourceMapURL)
+ this._debuggerWorkspaceBinding.maybeLoadSourceMap(script);
} else if (!this._scriptIdToPositions.has(script.scriptId)) {
this._scriptIdToPositions.set(script.scriptId, []);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698