Chromium Code Reviews| 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, |