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

Unified Diff: Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 448743002: DevTools: Linkify console stacks with blackboxing consideration. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 4 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 | Source/devtools/front_end/inspectorStyle.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/console/ConsoleViewMessage.js
diff --git a/Source/devtools/front_end/console/ConsoleViewMessage.js b/Source/devtools/front_end/console/ConsoleViewMessage.js
index 65a05fc87bc8ec687268a2d78dfe220bac59bba3..b755abc59290c4b5008d28b105477ab84c616d4d 100644
--- a/Source/devtools/front_end/console/ConsoleViewMessage.js
+++ b/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -196,7 +196,8 @@ WebInspector.ConsoleViewMessage.prototype = {
}
if (consoleMessage.source !== WebInspector.ConsoleMessage.MessageSource.Network || consoleMessage.request) {
- var callFrame = this._callFrameAnchorFromStackTrace(consoleMessage.stackTrace);
+ var useBlackboxing = (consoleMessage.source === WebInspector.ConsoleMessage.MessageSource.ConsoleAPI);
+ var callFrame = this._callFrameAnchorFromStackTrace(consoleMessage.stackTrace, useBlackboxing);
if (callFrame)
this._anchorElement = this._linkifyCallFrame(callFrame);
else if (consoleMessage.url && consoleMessage.url !== "undefined")
@@ -285,21 +286,20 @@ WebInspector.ConsoleViewMessage.prototype = {
/**
* @param {?Array.<!ConsoleAgent.CallFrame>} stackTrace
+ * @param {boolean} useBlackboxing
* @return {?ConsoleAgent.CallFrame}
*/
- _callFrameAnchorFromStackTrace: function(stackTrace)
+ _callFrameAnchorFromStackTrace: function(stackTrace, useBlackboxing)
{
if (!stackTrace || !stackTrace.length)
return null;
var callFrame = stackTrace[0].scriptId ? stackTrace[0] : null;
- if (!WebInspector.experimentsSettings.frameworksDebuggingSupport.isEnabled())
+ if (!useBlackboxing)
return callFrame;
- var regex = WebInspector.settings.skipStackFramesPattern.asRegExp();
- if (!regex)
+ if (!WebInspector.experimentsSettings.frameworksDebuggingSupport.isEnabled())
return callFrame;
for (var i = 0; i < stackTrace.length; ++i) {
- var script = this._target().debuggerModel.scriptForId(stackTrace[i].scriptId);
- if (!script || !regex.test(script.sourceURL))
+ if (!WebInspector.BlackboxSupport.isBlackboxedURL(stackTrace[i].url))
return stackTrace[i].scriptId ? stackTrace[i] : null;
}
return callFrame;
@@ -1063,10 +1063,10 @@ WebInspector.ConsoleViewMessage.prototype = {
content.createChild("span", "console-message-text source-code").textContent = functionName;
if (frame.scriptId) {
- content.createTextChild(" ");
var urlElement = this._linkifyCallFrame(frame);
if (!urlElement)
continue;
+ content.createTextChild(" ");
content.appendChild(urlElement);
}
« no previous file with comments | « no previous file | Source/devtools/front_end/inspectorStyle.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698