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

Unified Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 416843002: DevTools: Send async stack trace with Network.Initiator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 5 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: Source/devtools/front_end/network/NetworkPanel.js
diff --git a/Source/devtools/front_end/network/NetworkPanel.js b/Source/devtools/front_end/network/NetworkPanel.js
index 574d4fe7d881a30e48fcef8af60c2fe4b71ce4aa..6f565296d4b5f62d3c4c80b1581904c40c919ad4 100644
--- a/Source/devtools/front_end/network/NetworkPanel.js
+++ b/Source/devtools/front_end/network/NetworkPanel.js
@@ -1012,17 +1012,40 @@ WebInspector.NetworkLogView.prototype = {
*/
_generateScriptInitiatedPopoverContent: function(request)
{
- var stackTrace = request.initiator.stackTrace;
var framesTable = document.createElement("table");
- for (var i = 0; i < stackTrace.length; ++i) {
- var stackFrame = stackTrace[i];
- var rawLocation = request.target().debuggerModel.createRawLocationByConsoleCallFrame(stackFrame);
- var row = document.createElement("tr");
- row.createChild("td").textContent = stackFrame.functionName || WebInspector.UIString("(anonymous function)");
- row.createChild("td").textContent = " @ ";
- row.createChild("td").appendChild(this._linkifier.linkifyRawLocation(rawLocation));
- framesTable.appendChild(row);
+
+ /**
+ * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace
+ * @this {WebInspector.NetworkLogView}
+ */
+ function appendStackTrace(stackTrace)
+ {
+ for (var i = 0; i < stackTrace.length; ++i) {
+ var stackFrame = stackTrace[i];
+ var rawLocation = request.target().debuggerModel.createRawLocationByConsoleCallFrame(stackFrame);
+ var row = document.createElement("tr");
+ row.createChild("td").textContent = stackFrame.functionName || WebInspector.UIString("(anonymous function)");
+ row.createChild("td").textContent = " @ ";
+ row.createChild("td").appendChild(this._linkifier.linkifyRawLocation(rawLocation));
+ framesTable.appendChild(row);
+ }
}
+
+ appendStackTrace.call(this, request.initiator.stackTrace);
+
+ var asyncStackTrace = request.initiator.asyncStackTrace;
+ while (asyncStackTrace) {
+ var callFrames = asyncStackTrace.callFrames;
+ if (!callFrames || !callFrames.length)
+ break;
+ var row = framesTable.createChild("tr");
+ row.createChild("td", "network-async-trace-description").textContent = WebInspector.asyncStackTraceLabel(asyncStackTrace.description);
+ row.createChild("td");
+ row.createChild("td");
+ appendStackTrace.call(this, callFrames);
+ asyncStackTrace = asyncStackTrace.asyncStackTrace;
+ }
+
return framesTable;
},
« no previous file with comments | « Source/devtools/front_end/console/ConsoleViewMessage.js ('k') | Source/devtools/front_end/networkLogView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698