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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineJSProfile.js

Issue 2156523003: [DevTools] Fix links for JSFrame records in timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineJSProfile.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineJSProfile.js b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineJSProfile.js
index 98ec786f388c52cc4738ce6eadadbfec15fd5d9a..7893c847464015e835f08c938869487927b396c5 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineJSProfile.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineJSProfile.js
@@ -33,8 +33,16 @@ WebInspector.TimelineJSProfileProcessor.generateTracingEventsFromCpuProfile = fu
if (!callFrames) {
callFrames = /** @type {!Array<!RuntimeAgent.CallFrame>} */ (new Array(node.depth + 1));
nodeToStackMap.set(node, callFrames);
- for (var j = 0; node.parent; node = node.parent)
- callFrames[j++] = /** @type {!RuntimeAgent.CallFrame} */ (node);
+ for (var j = 0; node.parent; node = node.parent) {
+ // Tracing Events are 1-based.
+ callFrames[j++] = /** @type {!RuntimeAgent.CallFrame} */ ({
+ functionName: node.functionName,
alph 2016/07/15 22:42:25 You're creating a bunch of objects here. There wer
+ scriptId: node.scriptId,
+ url: node.url,
+ lineNumber: node.lineNumber + 1,
+ columnNumber: node.columnNumber + 1
+ });
+ }
}
var jsSampleEvent = new WebInspector.TracingModel.Event(WebInspector.TracingModel.DevToolsTimelineEventCategory,
WebInspector.TimelineModel.RecordType.JSSample,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698