Index: chrome/browser/resources/tracing/timeline_view.js |
diff --git a/chrome/browser/resources/tracing/timeline_view.js b/chrome/browser/resources/tracing/timeline_view.js |
index bd4a1d5fa8d3ad19866e0bfd20f4861fcaa6997a..7598ee634d714da08e0e9d30141657c2172be3af 100644 |
--- a/chrome/browser/resources/tracing/timeline_view.js |
+++ b/chrome/browser/resources/tracing/timeline_view.js |
@@ -64,7 +64,6 @@ cr.define('tracing', function() { |
}, |
set traceEvents(traceEvents) { |
- console.log('TimelineView.refresh'); |
this.timelineModel_ = new tracing.TimelineModel(traceEvents); |
// remove old timeline |
@@ -72,10 +71,11 @@ cr.define('tracing', function() { |
// create new timeline if needed |
if (traceEvents.length) { |
+ if (this.timeline_) |
+ this.timeline_.detach(); |
this.timeline_ = new tracing.Timeline(); |
this.timeline_.model = this.timelineModel_; |
this.timelineContainer_.appendChild(this.timeline_); |
- this.timeline_.onResize(); |
this.timeline_.addEventListener('selectionChange', |
this.onSelectionChangedBoundToThis_); |
this.onSelectionChanged_(); |
@@ -85,7 +85,6 @@ cr.define('tracing', function() { |
}, |
onSelectionChanged_: function(e) { |
- console.log('selection changed'); |
var timeline = this.timeline_; |
var selection = timeline.selection; |
if (!selection.length) { |
@@ -105,8 +104,9 @@ cr.define('tracing', function() { |
tsRound(slice.start) + ' ms\n'; |
text += leftAlign('Duration', c0Width) + ': ' + |
tsRound(slice.duration) + ' ms\n'; |
- text += leftAlign('Duration (U)', c0Width) + ': ' + |
- tsRound(slice.durationInUserTime) + ' ms\n'; |
+ if (slice.durationInUserTime) |
+ text += leftAlign('Duration (U)', c0Width) + ': ' + |
+ tsRound(slice.durationInUserTime) + ' ms\n'; |
var n = 0; |
for (var argName in slice.args) { |