Commit 3f51a080 authored by aandrey@chromium.org's avatar aandrey@chromium.org

DevTools: Blackbox content scripts - frontend.

BUG=160207
R=vsevik, yurys@chromium.org

Review URL: https://codereview.chromium.org/548323002

git-svn-id: svn://svn.chromium.org/blink/trunk@181961 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8f468ff0
Tests framework blackbox patterns for various URLs.
Testing http://www.example.com/foo/jquery-1.7-min.js
Testing https://www.example.com/jquery.js?version=1.7
Testing http://www.google.com/jsapi
Testing https://www.google.com/jsapi/
Testing data:text/html,foo
Testing about:blank
Testing chrome-extension://extensionName/main.js
Testing extensions::unload_events
PASS
<html>
<head>
<script src="../../../http/tests/inspector/inspector-test.js"></script>
<script>
function test()
{
var testCases = [
"http://www.example.com/foo/jquery-1.7-min.js", "/jquery\\-1\\.7\\-min\\.js$",
"https://www.example.com/jquery.js?version=1.7", "/jquery\\.js\\b",
"http://www.google.com/jsapi", "/jsapi$",
"https://www.google.com/jsapi/", "/jsapi/$",
"data:text/html,foo", "",
"about:blank", "",
"chrome-extension://extensionName/main.js", "^chrome-extension://extensionName\\b.*/main\\.js$",
"extensions::unload_events", "^extensions::unload_events$",
];
for (var i = 0; i < testCases.length; i += 2) {
var url = testCases[i];
InspectorTest.addResult("Testing " + url);
var regexValue = WebInspector.BlackboxSupport._urlToRegExpString(url);
InspectorTest.assertEquals(testCases[i + 1], regexValue);
if (!regexValue)
continue;
var regex = new RegExp(regexValue);
InspectorTest.assertTrue(regex.test(url), "FAIL: Generated RegExp does not match the URL");
}
InspectorTest.addResult("\nPASS");
InspectorTest.completeTest();
}
</script>
</head>
<body onload="runTest()">
<p>
Tests framework blackbox patterns for various URLs.
</p>
</body>
</html>
...@@ -187,8 +187,14 @@ WebInspector.Linkifier.prototype = { ...@@ -187,8 +187,14 @@ WebInspector.Linkifier.prototype = {
var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0; var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0;
var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 : 0; var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 : 0;
var anchor = this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, lineNumber, columnNumber, classes); var anchor = this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, lineNumber, columnNumber, classes);
if (WebInspector.BlackboxSupport.isBlackboxedURL(callFrame.url))
var script = target && target.debuggerModel.scriptForId(callFrame.scriptId);
var blackboxed = script ?
WebInspector.BlackboxSupport.isBlackboxed(script.sourceURL, script.isContentScript()) :
WebInspector.BlackboxSupport.isBlackboxedURL(callFrame.url);
if (blackboxed)
anchor.classList.add("webkit-html-blackbox-link"); anchor.classList.add("webkit-html-blackbox-link");
return anchor; return anchor;
}, },
......
...@@ -82,6 +82,7 @@ WebInspector.Settings = function() ...@@ -82,6 +82,7 @@ WebInspector.Settings = function()
this.shortcutPanelSwitch = this.createSetting("shortcutPanelSwitch", false); this.shortcutPanelSwitch = this.createSetting("shortcutPanelSwitch", false);
this.showWhitespacesInEditor = this.createSetting("showWhitespacesInEditor", false); this.showWhitespacesInEditor = this.createSetting("showWhitespacesInEditor", false);
this.skipStackFramesPattern = this.createRegExpSetting("skipStackFramesPattern", ""); this.skipStackFramesPattern = this.createRegExpSetting("skipStackFramesPattern", "");
this.skipContentScripts = this.createSetting("skipContentScripts", false);
this.pauseOnExceptionEnabled = this.createSetting("pauseOnExceptionEnabled", false); this.pauseOnExceptionEnabled = this.createSetting("pauseOnExceptionEnabled", false);
this.pauseOnCaughtException = this.createSetting("pauseOnCaughtException", false); this.pauseOnCaughtException = this.createSetting("pauseOnCaughtException", false);
this.enableAsyncStackTraces = this.createSetting("enableAsyncStackTraces", false); this.enableAsyncStackTraces = this.createSetting("enableAsyncStackTraces", false);
......
...@@ -319,8 +319,13 @@ WebInspector.ConsoleViewMessage.prototype = { ...@@ -319,8 +319,13 @@ WebInspector.ConsoleViewMessage.prototype = {
var callFrame = stackTrace[0].scriptId ? stackTrace[0] : null; var callFrame = stackTrace[0].scriptId ? stackTrace[0] : null;
if (!useBlackboxing) if (!useBlackboxing)
return callFrame; return callFrame;
var target = this._target();
for (var i = 0; i < stackTrace.length; ++i) { for (var i = 0; i < stackTrace.length; ++i) {
if (!WebInspector.BlackboxSupport.isBlackboxedURL(stackTrace[i].url)) var script = target && target.debuggerModel.scriptForId(stackTrace[i].scriptId);
var blackboxed = script ?
WebInspector.BlackboxSupport.isBlackboxed(script.sourceURL, script.isContentScript()) :
WebInspector.BlackboxSupport.isBlackboxedURL(stackTrace[i].url);
if (!blackboxed)
return stackTrace[i].scriptId ? stackTrace[i] : null; return stackTrace[i].scriptId ? stackTrace[i] : null;
} }
return callFrame; return callFrame;
......
...@@ -607,6 +607,11 @@ select.list-column-editor { ...@@ -607,6 +607,11 @@ select.list-column-editor {
margin-left: -7px margin-left: -7px
} }
.blackbox-content-scripts {
padding: 0 0 14px 0;
margin-left: -4px;
}
.settings-dialog .done-button { .settings-dialog .done-button {
float: right; float: right;
} }
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
WebInspector.BlackboxSupport = function() WebInspector.BlackboxSupport = {}
{
}
/** /**
* @param {string} url * @param {string} url
...@@ -12,8 +10,36 @@ WebInspector.BlackboxSupport = function() ...@@ -12,8 +10,36 @@ WebInspector.BlackboxSupport = function()
*/ */
WebInspector.BlackboxSupport._urlToRegExpString = function(url) WebInspector.BlackboxSupport._urlToRegExpString = function(url)
{ {
var name = new WebInspector.ParsedURL(url).lastPathComponent; var parsedURL = new WebInspector.ParsedURL(url);
return "/" + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\b"); if (parsedURL.isAboutBlank() || parsedURL.isDataURL())
return "";
if (!parsedURL.isValid)
return "^" + url.escapeForRegExp() + "$";
var name = parsedURL.lastPathComponent;
if (name)
name = "/" + name;
else if (parsedURL.folderPathComponents)
name = parsedURL.folderPathComponents + "/";
if (!name)
return "";
var scheme = parsedURL.scheme;
var prefix = "";
if (scheme && scheme !== "http" && scheme !== "https") {
prefix = "^" + scheme + "://";
if (scheme === "chrome-extension")
prefix += parsedURL.host + "\\b";
prefix += ".*";
}
return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\b");
}
/**
* @param {string} url
* @return {boolean}
*/
WebInspector.BlackboxSupport.canBlackboxURL = function(url)
{
return !!WebInspector.BlackboxSupport._urlToRegExpString(url);
} }
/** /**
...@@ -23,6 +49,8 @@ WebInspector.BlackboxSupport.blackboxURL = function(url) ...@@ -23,6 +49,8 @@ WebInspector.BlackboxSupport.blackboxURL = function(url)
{ {
var regexPatterns = WebInspector.settings.skipStackFramesPattern.getAsArray(); var regexPatterns = WebInspector.settings.skipStackFramesPattern.getAsArray();
var regexValue = WebInspector.BlackboxSupport._urlToRegExpString(url); var regexValue = WebInspector.BlackboxSupport._urlToRegExpString(url);
if (!regexValue)
return;
var found = false; var found = false;
for (var i = 0; i < regexPatterns.length; ++i) { for (var i = 0; i < regexPatterns.length; ++i) {
var item = regexPatterns[i]; var item = regexPatterns[i];
...@@ -39,11 +67,17 @@ WebInspector.BlackboxSupport.blackboxURL = function(url) ...@@ -39,11 +67,17 @@ WebInspector.BlackboxSupport.blackboxURL = function(url)
/** /**
* @param {string} url * @param {string} url
* @param {boolean} isContentScript
*/ */
WebInspector.BlackboxSupport.unblackboxURL = function(url) WebInspector.BlackboxSupport.unblackbox = function(url, isContentScript)
{ {
if (isContentScript)
WebInspector.settings.skipContentScripts.set(false);
var regexPatterns = WebInspector.settings.skipStackFramesPattern.getAsArray(); var regexPatterns = WebInspector.settings.skipStackFramesPattern.getAsArray();
var regexValue = WebInspector.BlackboxSupport._urlToRegExpString(url); var regexValue = WebInspector.BlackboxSupport._urlToRegExpString(url);
if (!regexValue)
return;
regexPatterns = regexPatterns.filter(function(item) { regexPatterns = regexPatterns.filter(function(item) {
return item.pattern !== regexValue; return item.pattern !== regexValue;
}); });
...@@ -70,3 +104,15 @@ WebInspector.BlackboxSupport.isBlackboxedURL = function(url) ...@@ -70,3 +104,15 @@ WebInspector.BlackboxSupport.isBlackboxedURL = function(url)
var regex = WebInspector.settings.skipStackFramesPattern.asRegExp(); var regex = WebInspector.settings.skipStackFramesPattern.asRegExp();
return (url && regex) ? regex.test(url) : false; return (url && regex) ? regex.test(url) : false;
} }
/**
* @param {string} url
* @param {boolean} isContentScript
* @return {boolean}
*/
WebInspector.BlackboxSupport.isBlackboxed = function(url, isContentScript)
{
if (isContentScript && WebInspector.settings.skipContentScripts.get())
return true;
return WebInspector.BlackboxSupport.isBlackboxedURL(url);
}
...@@ -60,6 +60,7 @@ WebInspector.DebuggerModel = function(target) ...@@ -60,6 +60,7 @@ WebInspector.DebuggerModel = function(target)
this.enableDebugger(); this.enableDebugger();
WebInspector.settings.skipStackFramesPattern.addChangeListener(this._applySkipStackFrameSettings, this); WebInspector.settings.skipStackFramesPattern.addChangeListener(this._applySkipStackFrameSettings, this);
WebInspector.settings.skipContentScripts.addChangeListener(this._applySkipStackFrameSettings, this);
this._applySkipStackFrameSettings(); this._applySkipStackFrameSettings();
} }
...@@ -666,7 +667,7 @@ WebInspector.DebuggerModel.prototype = { ...@@ -666,7 +667,7 @@ WebInspector.DebuggerModel.prototype = {
_applySkipStackFrameSettings: function() _applySkipStackFrameSettings: function()
{ {
this._agent.skipStackFrames(WebInspector.settings.skipStackFramesPattern.get()); this._agent.skipStackFrames(WebInspector.settings.skipStackFramesPattern.get(), WebInspector.settings.skipContentScripts.get());
}, },
/** /**
...@@ -722,6 +723,7 @@ WebInspector.DebuggerModel.prototype = { ...@@ -722,6 +723,7 @@ WebInspector.DebuggerModel.prototype = {
WebInspector.settings.pauseOnExceptionEnabled.removeChangeListener(this._pauseOnExceptionStateChanged, this); WebInspector.settings.pauseOnExceptionEnabled.removeChangeListener(this._pauseOnExceptionStateChanged, this);
WebInspector.settings.pauseOnCaughtException.removeChangeListener(this._pauseOnExceptionStateChanged, this); WebInspector.settings.pauseOnCaughtException.removeChangeListener(this._pauseOnExceptionStateChanged, this);
WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._applySkipStackFrameSettings, this); WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._applySkipStackFrameSettings, this);
WebInspector.settings.skipContentScripts.removeChangeListener(this._applySkipStackFrameSettings, this);
WebInspector.settings.enableAsyncStackTraces.removeChangeListener(this._asyncStackTracesStateChanged, this); WebInspector.settings.enableAsyncStackTraces.removeChangeListener(this._asyncStackTracesStateChanged, this);
}, },
......
...@@ -22,6 +22,9 @@ WebInspector.FrameworkBlackboxDialog = function() ...@@ -22,6 +22,9 @@ WebInspector.FrameworkBlackboxDialog = function()
var contents = this.element.createChild("div", "contents"); var contents = this.element.createChild("div", "contents");
var contentScriptsSection = contents.createChild("div", "blackbox-content-scripts");
contentScriptsSection.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Blackbox content scripts"), WebInspector.settings.skipContentScripts, true));
var blockHeader = contents.createChild("div", "columns-header"); var blockHeader = contents.createChild("div", "columns-header");
blockHeader.createChild("span").textContent = WebInspector.UIString("URI pattern"); blockHeader.createChild("span").textContent = WebInspector.UIString("URI pattern");
blockHeader.createChild("span").textContent = WebInspector.UIString("Behavior"); blockHeader.createChild("span").textContent = WebInspector.UIString("Behavior");
......
...@@ -891,15 +891,36 @@ WebInspector.EditableSettingsList.prototype = { ...@@ -891,15 +891,36 @@ WebInspector.EditableSettingsList.prototype = {
var columnId = column.id; var columnId = column.id;
var value = this._valuesProvider(itemId, columnId); var value = this._valuesProvider(itemId, columnId);
var textElement = this._textElements.get(itemId).get(columnId); this._setTextElementContent(itemId, columnId, value);
textElement.textContent = value;
textElement.title = value;
var editElement = this._editInputElements.get(itemId).get(columnId); var editElement = this._editInputElements.get(itemId).get(columnId);
this._setEditElementValue(editElement, value || ""); this._setEditElementValue(editElement, value || "");
} }
}, },
/**
* @param {?string} itemId
* @param {string} columnId
*/
_textElementContent: function(itemId, columnId)
{
if (!itemId)
return "";
return this._textElements.get(itemId).get(columnId).textContent.replace(/\u200B/g, "");
},
/**
* @param {string} itemId
* @param {string} columnId
* @param {string} text
*/
_setTextElementContent: function(itemId, columnId, text)
{
var textElement = this._textElements.get(itemId).get(columnId);
textElement.textContent = text.replace(/.{4}/g, "$&\u200B");
textElement.title = text;
},
/** /**
* @param {!Element} columnElement * @param {!Element} columnElement
* @param {{id: string, placeholder: (string|undefined), options: (!Array.<string>|undefined)}} column * @param {{id: string, placeholder: (string|undefined), options: (!Array.<string>|undefined)}} column
...@@ -922,10 +943,9 @@ WebInspector.EditableSettingsList.prototype = { ...@@ -922,10 +943,9 @@ WebInspector.EditableSettingsList.prototype = {
var value = this._valuesProvider(itemId, columnId); var value = this._valuesProvider(itemId, columnId);
var textElement = /** @type {!HTMLSpanElement} */ (columnElement.createChild("span", "list-column-text")); var textElement = /** @type {!HTMLSpanElement} */ (columnElement.createChild("span", "list-column-text"));
textElement.textContent = value;
textElement.title = value;
columnElement.addEventListener("click", rowClicked.bind(this), false); columnElement.addEventListener("click", rowClicked.bind(this), false);
this._textElements.get(itemId).set(columnId, textElement); this._textElements.get(itemId).set(columnId, textElement);
this._setTextElementContent(itemId, columnId, value);
this._createEditElement(columnElement, column, itemId, value); this._createEditElement(columnElement, column, itemId, value);
...@@ -1056,7 +1076,7 @@ WebInspector.EditableSettingsList.prototype = { ...@@ -1056,7 +1076,7 @@ WebInspector.EditableSettingsList.prototype = {
var columns = this.columns(); var columns = this.columns();
for (var i = 0; i < columns.length; ++i) { for (var i = 0; i < columns.length; ++i) {
var columnId = columns[i]; var columnId = columns[i];
var oldValue = itemId ? this._textElements.get(itemId).get(columnId).textContent : ""; var oldValue = this._textElementContent(itemId, columnId);
var newValue = this._inputElements(itemId).get(columnId).value; var newValue = this._inputElements(itemId).get(columnId).value;
if (oldValue !== newValue) if (oldValue !== newValue)
return true; return true;
...@@ -1091,7 +1111,7 @@ WebInspector.EditableSettingsList.prototype = { ...@@ -1091,7 +1111,7 @@ WebInspector.EditableSettingsList.prototype = {
for (var i = 0; i < columns.length; ++i) { for (var i = 0; i < columns.length; ++i) {
var columnId = columns[i]; var columnId = columns[i];
var editElement = this._editInputElements.get(itemId).get(columnId); var editElement = this._editInputElements.get(itemId).get(columnId);
this._setEditElementValue(editElement, this._textElements.get(itemId).get(columnId).textContent); this._setEditElementValue(editElement, this._textElementContent(itemId, columnId));
editElement.classList.remove("editable-item-error"); editElement.classList.remove("editable-item-error");
} }
return; return;
......
...@@ -114,7 +114,7 @@ WebInspector.CallStackSidebarPane.prototype = { ...@@ -114,7 +114,7 @@ WebInspector.CallStackSidebarPane.prototype = {
this.placards.push(placard); this.placards.push(placard);
this.bodyElement.appendChild(placard.element); this.bodyElement.appendChild(placard.element);
if (WebInspector.BlackboxSupport.isBlackboxedURL(callFrame.script.sourceURL)) { if (WebInspector.BlackboxSupport.isBlackboxed(callFrame.script.sourceURL, callFrame.script.isContentScript())) {
placard.setHidden(true); placard.setHidden(true);
placard.element.classList.add("dimmed"); placard.element.classList.add("dimmed");
++this._hiddenPlacards; ++this._hiddenPlacards;
...@@ -159,7 +159,7 @@ WebInspector.CallStackSidebarPane.prototype = { ...@@ -159,7 +159,7 @@ WebInspector.CallStackSidebarPane.prototype = {
var script = placard._callFrame.script; var script = placard._callFrame.script;
if (!script.isSnippet()) { if (!script.isSnippet()) {
contextMenu.appendSeparator(); contextMenu.appendSeparator();
this.appendBlackboxURLContextMenuItems(contextMenu, script.sourceURL); this.appendBlackboxURLContextMenuItems(contextMenu, script.sourceURL, script.isContentScript());
} }
contextMenu.show(); contextMenu.show();
...@@ -183,28 +183,36 @@ WebInspector.CallStackSidebarPane.prototype = { ...@@ -183,28 +183,36 @@ WebInspector.CallStackSidebarPane.prototype = {
/** /**
* @param {!WebInspector.ContextMenu} contextMenu * @param {!WebInspector.ContextMenu} contextMenu
* @param {string} url * @param {string} url
* @param {boolean} isContentScript
*/ */
appendBlackboxURLContextMenuItems: function(contextMenu, url) appendBlackboxURLContextMenuItems: function(contextMenu, url, isContentScript)
{ {
if (!url) var blackboxed = WebInspector.BlackboxSupport.isBlackboxed(url, isContentScript);
return; if (blackboxed) {
var blackboxed = WebInspector.BlackboxSupport.isBlackboxedURL(url); contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Stop blackboxing" : "Stop Blackboxing"), this._handleContextMenuBlackboxURL.bind(this, url, isContentScript, false));
if (blackboxed) } else {
contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Stop blackboxing" : "Stop Blackboxing"), this._handleContextMenuBlackboxURL.bind(this, url, false)); if (WebInspector.BlackboxSupport.canBlackboxURL(url))
else contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Blackbox script" : "Blackbox Script"), this._handleContextMenuBlackboxURL.bind(this, url, false, true));
contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Blackbox script" : "Blackbox Script"), this._handleContextMenuBlackboxURL.bind(this, url, true)); if (isContentScript)
contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Blackbox all content scripts" : "Blackbox All Content Scripts"), this._handleContextMenuBlackboxURL.bind(this, url, true, true));
}
}, },
/** /**
* @param {string} url * @param {string} url
* @param {boolean} isContentScript
* @param {boolean} blackbox * @param {boolean} blackbox
*/ */
_handleContextMenuBlackboxURL: function(url, blackbox) _handleContextMenuBlackboxURL: function(url, isContentScript, blackbox)
{ {
if (blackbox) if (blackbox) {
WebInspector.BlackboxSupport.blackboxURL(url); if (isContentScript)
else WebInspector.settings.skipContentScripts.set(true);
WebInspector.BlackboxSupport.unblackboxURL(url); else
WebInspector.BlackboxSupport.blackboxURL(url);
} else {
WebInspector.BlackboxSupport.unblackbox(url, isContentScript);
}
}, },
_blackboxingStateChanged: function() _blackboxingStateChanged: function()
......
...@@ -73,6 +73,7 @@ WebInspector.JavaScriptSourceFrame = function(scriptsPanel, uiSourceCode) ...@@ -73,6 +73,7 @@ WebInspector.JavaScriptSourceFrame = function(scriptsPanel, uiSourceCode)
} }
WebInspector.settings.skipStackFramesPattern.addChangeListener(this._showBlackboxInfobarIfNeeded, this); WebInspector.settings.skipStackFramesPattern.addChangeListener(this._showBlackboxInfobarIfNeeded, this);
WebInspector.settings.skipContentScripts.addChangeListener(this._showBlackboxInfobarIfNeeded, this);
this._showBlackboxInfobarIfNeeded(); this._showBlackboxInfobarIfNeeded();
} }
...@@ -126,7 +127,8 @@ WebInspector.JavaScriptSourceFrame.prototype = { ...@@ -126,7 +127,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
if (this._uiSourceCode.contentType() !== WebInspector.resourceTypes.Script) if (this._uiSourceCode.contentType() !== WebInspector.resourceTypes.Script)
return; return;
var url = this._uiSourceCode.url; 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(); this._hideBlackboxInfobar();
return; return;
} }
...@@ -148,7 +150,7 @@ WebInspector.JavaScriptSourceFrame.prototype = { ...@@ -148,7 +150,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
function unblackbox() function unblackbox()
{ {
WebInspector.BlackboxSupport.unblackboxURL(url); WebInspector.BlackboxSupport.unblackbox(url, isContentScript);
} }
this._updateInfobars(); this._updateInfobars();
...@@ -912,6 +914,7 @@ WebInspector.JavaScriptSourceFrame.prototype = { ...@@ -912,6 +914,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this); this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._showBlackboxInfobarIfNeeded, this); this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.TitleChanged, this._showBlackboxInfobarIfNeeded, this);
WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._showBlackboxInfobarIfNeeded, this); WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._showBlackboxInfobarIfNeeded, this);
WebInspector.settings.skipContentScripts.removeChangeListener(this._showBlackboxInfobarIfNeeded, this);
WebInspector.UISourceCodeFrame.prototype.dispose.call(this); WebInspector.UISourceCodeFrame.prototype.dispose.call(this);
}, },
......
...@@ -878,7 +878,7 @@ WebInspector.SourcesPanel.prototype = { ...@@ -878,7 +878,7 @@ WebInspector.SourcesPanel.prototype = {
this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode); this._appendUISourceCodeMappingItems(contextMenu, uiSourceCode);
if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script && project.type() !== WebInspector.projectTypes.Snippets) if (uiSourceCode.contentType() === WebInspector.resourceTypes.Script && project.type() !== WebInspector.projectTypes.Snippets)
this.sidebarPanes.callstack.appendBlackboxURLContextMenuItems(contextMenu, uiSourceCode.url); this.sidebarPanes.callstack.appendBlackboxURLContextMenuItems(contextMenu, uiSourceCode.url, project.type() === WebInspector.projectTypes.ContentScripts);
if (!event.target.isSelfOrDescendant(this.editorView.sidebarElement())) { if (!event.target.isSelfOrDescendant(this.editorView.sidebarElement())) {
contextMenu.appendSeparator(); contextMenu.appendSeparator();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment