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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js

Issue 1666563005: DevTools: merge ScriptCallStack and ScriptAsyncCallStack, move CallStacks from console to Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: testts 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
Index: third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js b/third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js
index b5719fc399fbe26bf579420ef7018f4120cab769..b40b21f3a08c5847eda797119631b9978e108cad 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js
@@ -6,44 +6,39 @@ WebInspector.DebuggerPresentationUtils = {}
/**
* @param {?WebInspector.DebuggerModel} debuggerModel
- * @param {!Array.<!ConsoleAgent.CallFrame>=} stackTrace
- * @param {!ConsoleAgent.AsyncStackTrace=} asyncStackTrace
+ * @param {!RuntimeAgent.StackTrace=} stackTrace
* @param {boolean=} showBlackboxed
- * @return {?ConsoleAgent.CallFrame}
+ * @return {?RuntimeAgent.CallFrame}
*/
-WebInspector.DebuggerPresentationUtils.callFrameAnchorFromStackTrace = function(debuggerModel, stackTrace, asyncStackTrace, showBlackboxed)
+WebInspector.DebuggerPresentationUtils.callFrameAnchorFromStackTrace = function(debuggerModel, stackTrace, showBlackboxed)
{
/**
- * @param {?Array.<!ConsoleAgent.CallFrame>=} stackTrace
- * @return {?ConsoleAgent.CallFrame}
+ * @param {!Array.<!RuntimeAgent.CallFrame>} callFrames
+ * @return {?RuntimeAgent.CallFrame}
*/
- function innerCallFrameAnchorFromStackTrace(stackTrace)
+ function innerCallFrameAnchorFromStackTrace(callFrames)
{
- if (!stackTrace || !stackTrace.length)
+ if (!callFrames.length)
return null;
if (showBlackboxed)
- return stackTrace[0];
- for (var i = 0; i < stackTrace.length; ++i) {
- var script = debuggerModel && debuggerModel.scriptForId(stackTrace[i].scriptId);
+ return callFrames[0];
+ for (var i = 0; i < callFrames.length; ++i) {
+ var script = debuggerModel && debuggerModel.scriptForId(callFrames[i].scriptId);
var blackboxed = script ?
WebInspector.BlackboxSupport.isBlackboxed(script.sourceURL, script.isContentScript()) :
- WebInspector.BlackboxSupport.isBlackboxedURL(stackTrace[i].url);
+ WebInspector.BlackboxSupport.isBlackboxedURL(callFrames[i].url);
if (!blackboxed)
- return stackTrace[i];
+ return callFrames[i];
}
return null;
}
- var callFrame = innerCallFrameAnchorFromStackTrace(stackTrace);
- if (callFrame)
- return callFrame;
-
+ var asyncStackTrace = stackTrace;
while (asyncStackTrace) {
- callFrame = innerCallFrameAnchorFromStackTrace(asyncStackTrace.callFrames);
+ var callFrame = innerCallFrameAnchorFromStackTrace(asyncStackTrace.callFrames);
if (callFrame)
return callFrame;
- asyncStackTrace = asyncStackTrace.asyncStackTrace;
+ asyncStackTrace = asyncStackTrace.parent;
}
-
- return stackTrace ? stackTrace[0] : null;
+ return stackTrace && stackTrace.callFrames.length ? stackTrace.callFrames[0] : null;
}

Powered by Google App Engine
This is Rietveld 408576698