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

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineModel.js

Issue 327793002: Timeline: return 'null' from JSCallStack::asTraceFormat() when stack is absent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: also fix front-end Created 6 years, 6 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
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.cpp ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 5 /**
6 * @param {!WebInspector.TracingModel} tracingModel 6 * @param {!WebInspector.TracingModel} tracingModel
7 * @constructor 7 * @constructor
8 * @extends {WebInspector.TimelineModel} 8 * @extends {WebInspector.TimelineModel}
9 */ 9 */
10 WebInspector.TracingTimelineModel = function(tracingModel) 10 WebInspector.TracingTimelineModel = function(tracingModel)
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 event.selfTime = duration; 303 event.selfTime = duration;
304 eventStack.push(event); 304 eventStack.push(event);
305 } 305 }
306 306
307 if (this._currentScriptEvent && event.startTime > this._currentScriptEve nt.endTime) 307 if (this._currentScriptEvent && event.startTime > this._currentScriptEve nt.endTime)
308 this._currentScriptEvent = null; 308 this._currentScriptEvent = null;
309 309
310 switch (event.name) { 310 switch (event.name) {
311 case recordTypes.CallStack: 311 case recordTypes.CallStack:
312 var lastMainThreadEvent = this._mainThreadEvents.peekLast(); 312 var lastMainThreadEvent = this._mainThreadEvents.peekLast();
313 if (lastMainThreadEvent) 313 if (lastMainThreadEvent && event.args.stack && event.args.stack.leng th)
314 lastMainThreadEvent.stackTrace = event.args.stack; 314 lastMainThreadEvent.stackTrace = event.args.stack;
315 break; 315 break;
316 316
317 case recordTypes.ResourceSendRequest: 317 case recordTypes.ResourceSendRequest:
318 this._sendRequestEvents[event.args.data["requestId"]] = event; 318 this._sendRequestEvents[event.args.data["requestId"]] = event;
319 event.imageURL = event.args.data["url"]; 319 event.imageURL = event.args.data["url"];
320 break; 320 break;
321 321
322 case recordTypes.ResourceReceiveResponse: 322 case recordTypes.ResourceReceiveResponse:
323 case recordTypes.ResourceReceivedData: 323 case recordTypes.ResourceReceivedData:
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 { 643 {
644 var tokens = [this.title()]; 644 var tokens = [this.title()];
645 var data = this._event.args.data; 645 var data = this._event.args.data;
646 if (data) { 646 if (data) {
647 for (var key in data) 647 for (var key in data)
648 tokens.push(data[key]); 648 tokens.push(data[key]);
649 } 649 }
650 return regExp.test(tokens.join("|")); 650 return regExp.test(tokens.join("|"));
651 } 651 }
652 } 652 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698