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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.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/timeline/TimelineUIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
index f428c1f19b4b9c6ad0bc9251a60f5f40e68403da..d1a2a24d76e2f6ed3cbc76d386599e1c7c391ec0 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -258,7 +258,7 @@ WebInspector.TimelineUIUtils.isMarkerEvent = function(event)
}
/**
- * @param {!ConsoleAgent.CallFrame} frame
+ * @param {!RuntimeAgent.CallFrame} frame
* @return {boolean}
*/
WebInspector.TimelineUIUtils.isUserFrame = function(frame)
@@ -268,7 +268,7 @@ WebInspector.TimelineUIUtils.isUserFrame = function(frame)
/**
* @param {!WebInspector.TracingModel.Event} event
- * @return {?ConsoleAgent.CallFrame}
+ * @return {?RuntimeAgent.CallFrame}
*/
WebInspector.TimelineUIUtils.topStackFrame = function(event)
{
@@ -959,6 +959,15 @@ WebInspector.TimelineUIUtils.buildNetworkRequestDetails = function(request, mode
}
/**
+ * @param {!Array<!RuntimeAgent.CallFrame>} callFrames
+ * @return {!RuntimeAgent.StackTrace}
+ */
+WebInspector.TimelineUIUtils._stackTraceFromCallFrames = function(callFrames)
+{
+ return /** @type {!RuntimeAgent.StackTrace} */ ({ callFrames: callFrames });
+}
+
+/**
* @param {!WebInspector.TracingModel.Event} event
* @param {?WebInspector.Target} target
* @param {?Map<number, ?WebInspector.DOMNode>} relatedNodesMap
@@ -995,7 +1004,7 @@ WebInspector.TimelineUIUtils._generateCauses = function(event, target, relatedNo
// Direct cause.
if (event.stackTrace && event.stackTrace.length) {
contentHelper.addSection(WebInspector.UIString("Call Stacks"));
- contentHelper.appendStackTrace(stackLabel || WebInspector.UIString("Stack Trace"), event.stackTrace);
+ contentHelper.appendStackTrace(stackLabel || WebInspector.UIString("Stack Trace"), WebInspector.TimelineUIUtils._stackTraceFromCallFrames(event.stackTrace));
}
// Indirect causes.
@@ -1003,7 +1012,7 @@ WebInspector.TimelineUIUtils._generateCauses = function(event, target, relatedNo
contentHelper.addSection(WebInspector.UIString("Invalidations"));
WebInspector.TimelineUIUtils._generateInvalidations(event, target, relatedNodesMap, contentHelper);
} else if (initiator && initiator.stackTrace) { // Partial invalidation tracking.
- contentHelper.appendStackTrace(callSiteStackLabel || WebInspector.UIString("First Invalidated"), initiator.stackTrace);
+ contentHelper.appendStackTrace(callSiteStackLabel || WebInspector.UIString("First Invalidated"), WebInspector.TimelineUIUtils._stackTraceFromCallFrames(initiator.stackTrace));
}
}
@@ -1171,7 +1180,7 @@ WebInspector.TimelineUIUtils.InvalidationsGroupElement.prototype = {
if (first.cause.stackTrace) {
var stack = content.createChild("div");
stack.createTextChild(WebInspector.UIString("Stack trace:"));
- this._contentHelper.createChildStackTraceElement(stack, first.cause.stackTrace);
+ this._contentHelper.createChildStackTraceElement(stack, WebInspector.TimelineUIUtils._stackTraceFromCallFrames(first.cause.stackTrace));
}
content.createTextChild(this._invalidations.length > 1 ? WebInspector.UIString("Nodes:") : WebInspector.UIString("Node:"));
@@ -1992,7 +2001,7 @@ WebInspector.TimelineDetailsContentHelper.prototype = {
/**
* @param {string} title
- * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace
+ * @param {!RuntimeAgent.StackTrace} stackTrace
*/
appendStackTrace: function(title, stackTrace)
{
@@ -2006,7 +2015,7 @@ WebInspector.TimelineDetailsContentHelper.prototype = {
/**
* @param {!Element} parentElement
- * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace
+ * @param {!RuntimeAgent.StackTrace} stackTrace
*/
createChildStackTraceElement: function(parentElement, stackTrace)
{

Powered by Google App Engine
This is Rietveld 408576698