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

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..5a2e380ee2d3b272b89ec88a4165dc9e4f77d49c 100644
--- a/Source/devtools/front_end/console/ConsoleViewMessage.js
+++ b/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -196,7 +196,7 @@ WebInspector.ConsoleViewMessage.prototype = {
}
if (consoleMessage.source !== WebInspector.ConsoleMessage.MessageSource.Network || consoleMessage.request) {
- var callFrame = this._callFrameAnchorFromStackTrace(consoleMessage.stackTrace);
+ var callFrame = this._callFrameAnchorFromStackTrace(consoleMessage.stackTrace, consoleMessage.source === WebInspector.ConsoleMessage.MessageSource.ConsoleAPI);
if (callFrame)
this._anchorElement = this._linkifyCallFrame(callFrame);
else if (consoleMessage.url && consoleMessage.url !== "undefined")
@@ -285,21 +285,20 @@ WebInspector.ConsoleViewMessage.prototype = {
/**
* @param {?Array.<!ConsoleAgent.CallFrame>} stackTrace
+ * @param {boolean} isConsoleAPI
* @return {?ConsoleAgent.CallFrame}
*/
- _callFrameAnchorFromStackTrace: function(stackTrace)
+ _callFrameAnchorFromStackTrace: function(stackTrace, isConsoleAPI)
vsevik 2014/08/08 08:55:50 I would call this flag useBlackboxing instead.
aandrey 2014/08/08 10:05:56 Done.
{
if (!stackTrace || !stackTrace.length)
return null;
var callFrame = stackTrace[0].scriptId ? stackTrace[0] : null;
- if (!WebInspector.experimentsSettings.frameworksDebuggingSupport.isEnabled())
+ if (!isConsoleAPI)
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 +1062,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