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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.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/DOMPresentationUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js b/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
index 4d4d6c12f2b5db3378feed24d7d85ce97b0424f1..103d218f1483e5c5eec207e6afb561ed3593d62a 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
@@ -218,11 +218,10 @@ WebInspector.DOMPresentationUtils.buildImagePreviewContents = function(target, o
/**
* @param {!WebInspector.Target} target
* @param {!WebInspector.Linkifier} linkifier
- * @param {!Array.<!ConsoleAgent.CallFrame>=} stackTrace
- * @param {!ConsoleAgent.AsyncStackTrace=} asyncStackTrace
+ * @param {!RuntimeAgent.StackTrace=} stackTrace
* @return {!Element}
*/
-WebInspector.DOMPresentationUtils.buildStackTracePreviewContents = function(target, linkifier, stackTrace, asyncStackTrace)
+WebInspector.DOMPresentationUtils.buildStackTracePreviewContents = function(target, linkifier, stackTrace)
{
var element = createElement("span");
element.style.display = "inline-block";
@@ -230,11 +229,11 @@ WebInspector.DOMPresentationUtils.buildStackTracePreviewContents = function(targ
var contentElement = shadowRoot.createChild("table", "stack-preview-container");
/**
- * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace
+ * @param {!RuntimeAgent.StackTrace} stackTrace
*/
function appendStackTrace(stackTrace)
{
- for (var stackFrame of stackTrace) {
+ for (var stackFrame of stackTrace.callFrames) {
var row = createElement("tr");
row.createChild("td", "function-name").textContent = WebInspector.beautifyFunctionName(stackFrame.functionName);
row.createChild("td").textContent = " @ ";
@@ -243,19 +242,23 @@ WebInspector.DOMPresentationUtils.buildStackTracePreviewContents = function(targ
}
}
- if (stackTrace)
- appendStackTrace(stackTrace);
+ if (!stackTrace)
+ return element;
+ appendStackTrace(stackTrace);
+
+ var asyncStackTrace = stackTrace.parent;
while (asyncStackTrace) {
- var callFrames = asyncStackTrace.callFrames;
- if (!callFrames || !callFrames.length)
- break;
+ if (!asyncStackTrace.callFrames.length) {
+ asyncStackTrace = asyncStackTrace.parent;
+ continue;
+ }
var row = contentElement.createChild("tr");
row.createChild("td", "stack-preview-async-description").textContent = WebInspector.asyncStackTraceLabel(asyncStackTrace.description);
row.createChild("td");
row.createChild("td");
- appendStackTrace(callFrames);
- asyncStackTrace = asyncStackTrace.asyncStackTrace;
+ appendStackTrace(asyncStackTrace);
+ asyncStackTrace = asyncStackTrace.parent;
}
return element;

Powered by Google App Engine
This is Rietveld 408576698