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

Side by Side Diff: webkit/glue/devtools/js/heap_profiler_panel.js

Issue 355012: DevTools: prepare for WebKit change 50460. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | webkit/glue/devtools/js/inspector_controller.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 * @fileoverview Heap profiler panel implementation. 6 * @fileoverview Heap profiler panel implementation.
7 */ 7 */
8 8
9 WebInspector.ProfilesPanel.prototype.addSnapshot = function(snapshot) { 9 WebInspector.ProfilesPanel.prototype.addSnapshot = function(snapshot) {
10 snapshot.title = WebInspector.UIString("Snapshot %d", snapshot.number); 10 snapshot.title = WebInspector.UIString("Snapshot %d", snapshot.number);
11 snapshot.typeId = WebInspector.HeapSnapshotProfileType.TypeId;
11 12
12 var snapshots = WebInspector.HeapSnapshotProfileType.snapshots; 13 var snapshots = WebInspector.HeapSnapshotProfileType.snapshots;
13 snapshots.push(snapshot); 14 snapshots.push(snapshot);
14 15
15 snapshot.listIndex = snapshots.length - 1; 16 snapshot.listIndex = snapshots.length - 1;
16 17
17 this.addProfileHeader(WebInspector.HeapSnapshotProfileType.TypeId, snapshot) ; 18 if (WebInspector.CPUProfile)
19 this.addProfileHeader(WebInspector.HeapSnapshotProfileType.TypeId, snaps hot);
20 else
21 this.addProfileHeader(snapshot);
18 22
19 this.dispatchEventToListeners("snapshot added"); 23 this.dispatchEventToListeners("snapshot added");
20 } 24 }
21 25
22 26
23 WebInspector.HeapSnapshotView = function(parent, profile) 27 WebInspector.HeapSnapshotView = function(parent, profile)
24 { 28 {
25 WebInspector.View.call(this); 29 WebInspector.View.call(this);
26 30
27 this.element.addStyleClass("heap-snapshot-view"); 31 this.element.addStyleClass("heap-snapshot-view");
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 879
876 880
877 (function() { 881 (function() {
878 var originalCreatePanels = WebInspector._createPanels; 882 var originalCreatePanels = WebInspector._createPanels;
879 WebInspector._createPanels = function() { 883 WebInspector._createPanels = function() {
880 originalCreatePanels.apply(this, arguments); 884 originalCreatePanels.apply(this, arguments);
881 if (WebInspector.panels.profiles) 885 if (WebInspector.panels.profiles)
882 WebInspector.panels.profiles.registerProfileType(new WebInspector.He apSnapshotProfileType()); 886 WebInspector.panels.profiles.registerProfileType(new WebInspector.He apSnapshotProfileType());
883 } 887 }
884 })(); 888 })();
OLDNEW
« no previous file with comments | « webkit/glue/devtools/js/devtools.js ('k') | webkit/glue/devtools/js/inspector_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698