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

Unified Diff: Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 548323002: DevTools: Blackbox content scripts - frontend. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: added a test Created 6 years, 3 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
Index: Source/devtools/front_end/sources/JavaScriptSourceFrame.js
diff --git a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
index b9eedcbdeb51fba80f900043fa5f615e8cd3ead5..1846de4497b9d1aa8b888db2b03f4b3825b10a01 100644
--- a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
+++ b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
@@ -73,6 +73,7 @@ WebInspector.JavaScriptSourceFrame = function(scriptsPanel, uiSourceCode)
}
WebInspector.settings.skipStackFramesPattern.addChangeListener(this._showBlackboxInfobarIfNeeded, this);
+ WebInspector.settings.skipContentScripts.addChangeListener(this._showBlackboxInfobarIfNeeded, this);
this._showBlackboxInfobarIfNeeded();
}
@@ -126,7 +127,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
if (this._uiSourceCode.contentType() !== WebInspector.resourceTypes.Script)
return;
var url = this._uiSourceCode.url;
- if (!WebInspector.BlackboxSupport.isBlackboxedURL(url)) {
+ var isContentScript = this._uiSourceCode.project().type() === WebInspector.projectTypes.ContentScripts;
+ if (!WebInspector.BlackboxSupport.isBlackboxed(url, isContentScript)) {
this._hideBlackboxInfobar();
return;
}
@@ -148,7 +150,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
function unblackbox()
{
- WebInspector.BlackboxSupport.unblackboxURL(url);
+ WebInspector.BlackboxSupport.unblackbox(url, isContentScript);
}
this._updateInfobars();
@@ -912,6 +914,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._showBlackboxInfobarIfNeeded, this);
WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._showBlackboxInfobarIfNeeded, this);
+ WebInspector.settings.skipContentScripts.removeChangeListener(this._showBlackboxInfobarIfNeeded, this);
WebInspector.UISourceCodeFrame.prototype.dispose.call(this);
},
« no previous file with comments | « Source/devtools/front_end/sources/CallStackSidebarPane.js ('k') | Source/devtools/front_end/sources/SourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698