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

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

Issue 717243002: Timeline: do not imply event.thread.target is the main target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: avoid keep stale model in TimelineFrameModel Created 6 years, 1 month 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 */ 104 */
105 entryTitle: function(entryIndex) 105 entryTitle: function(entryIndex)
106 { 106 {
107 var event = this._entryEvents[entryIndex]; 107 var event = this._entryEvents[entryIndex];
108 if (event) { 108 if (event) {
109 if (event.phase === WebInspector.TracingModel.Phase.AsyncStepInto || event.phase === WebInspector.TracingModel.Phase.AsyncStepPast) 109 if (event.phase === WebInspector.TracingModel.Phase.AsyncStepInto || event.phase === WebInspector.TracingModel.Phase.AsyncStepPast)
110 return event.name + ":" + event.args["step"]; 110 return event.name + ":" + event.args["step"];
111 111
112 var name = WebInspector.TimelineUIUtils.eventStyle(event).title; 112 var name = WebInspector.TimelineUIUtils.eventStyle(event).title;
113 // TODO(yurys): support event dividers 113 // TODO(yurys): support event dividers
114 var details = WebInspector.TimelineUIUtils.buildDetailsNodeForTraceE vent(event, this._linkifier); 114 var details = WebInspector.TimelineUIUtils.buildDetailsNodeForTraceE vent(event, this._model.target(), this._linkifier);
115 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame && details) 115 if (event.name === WebInspector.TimelineModel.RecordType.JSFrame && details)
116 return details.textContent; 116 return details.textContent;
117 return details ? WebInspector.UIString("%s (%s)", name, details.text Content) : name; 117 return details ? WebInspector.UIString("%s (%s)", name, details.text Content) : name;
118 } 118 }
119 var title = this._entryIndexToTitle[entryIndex]; 119 var title = this._entryIndexToTitle[entryIndex];
120 if (!title) { 120 if (!title) {
121 title = WebInspector.UIString("Unexpected entryIndex %d", entryIndex ); 121 title = WebInspector.UIString("Unexpected entryIndex %d", entryIndex );
122 console.error(title); 122 console.error(title);
123 } 123 }
124 return title; 124 return title;
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 /** 788 /**
789 * @constructor 789 * @constructor
790 * @param {!WebInspector.TimelineSelection} selection 790 * @param {!WebInspector.TimelineSelection} selection
791 * @param {number} entryIndex 791 * @param {number} entryIndex
792 */ 792 */
793 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) 793 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex)
794 { 794 {
795 this.timelineSelection = selection; 795 this.timelineSelection = selection;
796 this.entryIndex = entryIndex; 796 this.entryIndex = entryIndex;
797 } 797 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/TracingManager.js ('k') | Source/devtools/front_end/timeline/TimelineFrameModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698