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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 { 1005 {
1006 this._linkifier.reset(); 1006 this._linkifier.reset();
1007 }, 1007 },
1008 1008
1009 /** 1009 /**
1010 * @param {!WebInspector.NetworkRequest} request 1010 * @param {!WebInspector.NetworkRequest} request
1011 * @return {!Element} 1011 * @return {!Element}
1012 */ 1012 */
1013 _generateScriptInitiatedPopoverContent: function(request) 1013 _generateScriptInitiatedPopoverContent: function(request)
1014 { 1014 {
1015 var stackTrace = request.initiator.stackTrace;
1016 var framesTable = document.createElement("table"); 1015 var framesTable = document.createElement("table");
1017 for (var i = 0; i < stackTrace.length; ++i) { 1016
1018 var stackFrame = stackTrace[i]; 1017 /**
1019 var rawLocation = request.target().debuggerModel.createRawLocationBy ConsoleCallFrame(stackFrame); 1018 * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace
1020 var row = document.createElement("tr"); 1019 * @this {WebInspector.NetworkLogView}
1021 row.createChild("td").textContent = stackFrame.functionName || WebIn spector.UIString("(anonymous function)"); 1020 */
1022 row.createChild("td").textContent = " @ "; 1021 function appendStackTrace(stackTrace)
1023 row.createChild("td").appendChild(this._linkifier.linkifyRawLocation (rawLocation)); 1022 {
1024 framesTable.appendChild(row); 1023 for (var i = 0; i < stackTrace.length; ++i) {
1024 var stackFrame = stackTrace[i];
1025 var rawLocation = request.target().debuggerModel.createRawLocati onByConsoleCallFrame(stackFrame);
1026 var row = document.createElement("tr");
1027 row.createChild("td").textContent = stackFrame.functionName || W ebInspector.UIString("(anonymous function)");
1028 row.createChild("td").textContent = " @ ";
1029 row.createChild("td").appendChild(this._linkifier.linkifyRawLoca tion(rawLocation));
1030 framesTable.appendChild(row);
1031 }
1025 } 1032 }
1033
1034 appendStackTrace.call(this, request.initiator.stackTrace);
1035
1036 var asyncStackTrace = request.initiator.asyncStackTrace;
1037 while (asyncStackTrace) {
1038 var callFrames = asyncStackTrace.callFrames;
1039 if (!callFrames || !callFrames.length)
1040 break;
1041 var row = framesTable.createChild("tr");
1042 row.createChild("td", "network-async-trace-description").textContent = WebInspector.asyncStackTraceLabel(asyncStackTrace.description);
1043 row.createChild("td");
1044 row.createChild("td");
1045 appendStackTrace.call(this, callFrames);
1046 asyncStackTrace = asyncStackTrace.asyncStackTrace;
1047 }
1048
1026 return framesTable; 1049 return framesTable;
1027 }, 1050 },
1028 1051
1029 _updateColumns: function() 1052 _updateColumns: function()
1030 { 1053 {
1031 var detailedMode = !!this._detailedMode; 1054 var detailedMode = !!this._detailedMode;
1032 var visibleColumns = {"name": true}; 1055 var visibleColumns = {"name": true};
1033 if (detailedMode) { 1056 if (detailedMode) {
1034 visibleColumns["timeline"] = true; 1057 visibleColumns["timeline"] = true;
1035 var columnsVisibility = this._coulmnsVisibilitySetting.get(); 1058 var columnsVisibility = this._coulmnsVisibilitySetting.get();
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa me, revert, a, b) 3041 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa me, revert, a, b)
3019 { 3042 {
3020 var aValue = a._request[propertyName]; 3043 var aValue = a._request[propertyName];
3021 var bValue = b._request[propertyName]; 3044 var bValue = b._request[propertyName];
3022 if (aValue > bValue) 3045 if (aValue > bValue)
3023 return revert ? -1 : 1; 3046 return revert ? -1 : 1;
3024 if (bValue > aValue) 3047 if (bValue > aValue)
3025 return revert ? 1 : -1; 3048 return revert ? 1 : -1;
3026 return a._request.indentityCompare(b._request); 3049 return a._request.indentityCompare(b._request);
3027 } 3050 }
OLDNEW
« 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