Index: webkit/glue/devtools/js/heap_profiler_panel.js |
diff --git a/webkit/glue/devtools/js/heap_profiler_panel.js b/webkit/glue/devtools/js/heap_profiler_panel.js |
index ee80506717725a79ac23fcaeccb017a7d8f1f768..b0d9b688aa853ce9558333a25970e0cfd68c16ef 100644 |
--- a/webkit/glue/devtools/js/heap_profiler_panel.js |
+++ b/webkit/glue/devtools/js/heap_profiler_panel.js |
@@ -8,13 +8,17 @@ |
WebInspector.ProfilesPanel.prototype.addSnapshot = function(snapshot) { |
snapshot.title = WebInspector.UIString("Snapshot %d", snapshot.number); |
+ snapshot.typeId = WebInspector.HeapSnapshotProfileType.TypeId; |
var snapshots = WebInspector.HeapSnapshotProfileType.snapshots; |
snapshots.push(snapshot); |
snapshot.listIndex = snapshots.length - 1; |
- this.addProfileHeader(WebInspector.HeapSnapshotProfileType.TypeId, snapshot); |
+ if (WebInspector.CPUProfile) |
+ this.addProfileHeader(WebInspector.HeapSnapshotProfileType.TypeId, snapshot); |
+ else |
+ this.addProfileHeader(snapshot); |
this.dispatchEventToListeners("snapshot added"); |
} |