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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineProfileTree.js

Issue 2161253002: DevTools: Use proper target when processing worker thread events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments. 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 WebInspector.TimelineProfileTree = { }; 5 WebInspector.TimelineProfileTree = { };
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 */ 9 */
10 WebInspector.TimelineProfileTree.Node = function() 10 WebInspector.TimelineProfileTree.Node = function()
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 var url = frame["url"]; 196 var url = frame["url"];
197 if (url) 197 if (url)
198 return url; 198 return url;
199 frame = frame.parent; 199 frame = frame.parent;
200 } 200 }
201 return null; 201 return null;
202 } 202 }
203 203
204 /** 204 /**
205 * @param {!WebInspector.TracingModel.Event} event 205 * @param {!WebInspector.TracingModel.Event} event
206 * @return {?Object} 206 * @return {?RuntimeAgent.CallFrame}
207 */ 207 */
208 WebInspector.TimelineProfileTree.eventStackFrame = function(event) 208 WebInspector.TimelineProfileTree.eventStackFrame = function(event)
209 { 209 {
210 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame) 210 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame)
211 return event.args["data"]; 211 return /** @type {?RuntimeAgent.CallFrame} */ (event.args["data"] || nul l);
212 var topFrame = event.stackTrace && event.stackTrace[0]; 212 var topFrame = event.stackTrace && event.stackTrace[0];
213 if (topFrame) 213 if (topFrame)
214 return topFrame; 214 return /** @type {!RuntimeAgent.CallFrame} */ (topFrame);
215 var initiator = event.initiator; 215 var initiator = event.initiator;
216 return initiator && initiator.stackTrace && initiator.stackTrace[0] || null; 216 return /** @type {?RuntimeAgent.CallFrame} */ (initiator && initiator.stackT race && initiator.stackTrace[0] || null);
217 } 217 }
218 218
219 /** 219 /**
220 * @constructor 220 * @constructor
221 * @param {function(!WebInspector.TracingModel.Event):string} titleMapper 221 * @param {function(!WebInspector.TracingModel.Event):string} titleMapper
222 * @param {function(!WebInspector.TracingModel.Event):string} categoryMapper 222 * @param {function(!WebInspector.TracingModel.Event):string} categoryMapper
223 */ 223 */
224 WebInspector.TimelineAggregator = function(titleMapper, categoryMapper) 224 WebInspector.TimelineAggregator = function(titleMapper, categoryMapper)
225 { 225 {
226 this._titleMapper = titleMapper; 226 this._titleMapper = titleMapper;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 * @param {function(!WebInspector.TimelineProfileTree.Node):string} nodeToGr oupId 370 * @param {function(!WebInspector.TimelineProfileTree.Node):string} nodeToGr oupId
371 * @param {!WebInspector.TimelineProfileTree.Node} node 371 * @param {!WebInspector.TimelineProfileTree.Node} node
372 * @return {!WebInspector.TimelineProfileTree.Node} 372 * @return {!WebInspector.TimelineProfileTree.Node}
373 */ 373 */
374 _nodeToGroupNode: function(nodeToGroupId, node) 374 _nodeToGroupNode: function(nodeToGroupId, node)
375 { 375 {
376 var id = nodeToGroupId(node); 376 var id = nodeToGroupId(node);
377 return this._groupNodes.get(id) || this._buildGroupNode(id, node.event); 377 return this._groupNodes.get(id) || this._buildGroupNode(id, node.event);
378 }, 378 },
379 } 379 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698