| Index: Source/devtools/front_end/profiler/HeapSnapshotView.js
|
| diff --git a/Source/devtools/front_end/profiler/HeapSnapshotView.js b/Source/devtools/front_end/profiler/HeapSnapshotView.js
|
| index af904dddbdcc04288fa9887bc22e9aad750075ad..5509abaf013fd1ff10a9c0ee0fe0fcd98bb6382f 100644
|
| --- a/Source/devtools/front_end/profiler/HeapSnapshotView.js
|
| +++ b/Source/devtools/front_end/profiler/HeapSnapshotView.js
|
| @@ -31,9 +31,10 @@
|
| /**
|
| * @constructor
|
| * @extends {WebInspector.VBox}
|
| + * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate
|
| * @param {!WebInspector.HeapProfileHeader} profile
|
| */
|
| -WebInspector.HeapSnapshotView = function(profile)
|
| +WebInspector.HeapSnapshotView = function(dataDisplayDelegate, profile)
|
| {
|
| WebInspector.VBox.call(this);
|
|
|
| @@ -52,7 +53,7 @@ WebInspector.HeapSnapshotView = function(profile)
|
|
|
| this._containmentView = new WebInspector.VBox();
|
| this._containmentView.setMinimumSize(50, 25);
|
| - this._containmentDataGrid = new WebInspector.HeapSnapshotContainmentDataGrid();
|
| + this._containmentDataGrid = new WebInspector.HeapSnapshotContainmentDataGrid(dataDisplayDelegate);
|
| this._containmentDataGrid.show(this._containmentView.element);
|
| this._containmentDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._selectionChanged, this);
|
|
|
| @@ -61,27 +62,27 @@ WebInspector.HeapSnapshotView = function(profile)
|
| this._constructorsView = new WebInspector.VBox();
|
| this._constructorsView.setMinimumSize(50, 25);
|
|
|
| - this._constructorsDataGrid = new WebInspector.HeapSnapshotConstructorsDataGrid();
|
| + this._constructorsDataGrid = new WebInspector.HeapSnapshotConstructorsDataGrid(dataDisplayDelegate);
|
| this._constructorsDataGrid.show(this._constructorsView.element);
|
| this._constructorsDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._selectionChanged, this);
|
|
|
| this._diffView = new WebInspector.VBox();
|
| this._diffView.setMinimumSize(50, 25);
|
|
|
| - this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid();
|
| + this._diffDataGrid = new WebInspector.HeapSnapshotDiffDataGrid(dataDisplayDelegate);
|
| this._diffDataGrid.show(this._diffView.element);
|
| this._diffDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._selectionChanged, this);
|
|
|
| this._dominatorView = new WebInspector.VBox();
|
| this._dominatorView.setMinimumSize(50, 25);
|
| - this._dominatorDataGrid = new WebInspector.HeapSnapshotDominatorsDataGrid();
|
| + this._dominatorDataGrid = new WebInspector.HeapSnapshotDominatorsDataGrid(dataDisplayDelegate);
|
| this._dominatorDataGrid.show(this._dominatorView.element);
|
| this._dominatorDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._selectionChanged, this);
|
|
|
| if (WebInspector.experimentsSettings.allocationProfiler.isEnabled() && profile.profileType() === WebInspector.ProfileTypeRegistry.instance.trackingHeapSnapshotProfileType) {
|
| this._allocationView = new WebInspector.VBox();
|
| this._allocationView.setMinimumSize(50, 25);
|
| - this._allocationDataGrid = new WebInspector.AllocationDataGrid();
|
| + this._allocationDataGrid = new WebInspector.AllocationDataGrid(dataDisplayDelegate);
|
| this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._onSelectAllocationNode, this);
|
| this._allocationDataGrid.show(this._allocationView.element);
|
|
|
| @@ -121,7 +122,7 @@ WebInspector.HeapSnapshotView = function(profile)
|
| this._splitView.hideDefaultResizer();
|
| this._splitView.installResizer(splitViewResizer);
|
|
|
| - this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid();
|
| + this._retainmentDataGrid = new WebInspector.HeapSnapshotRetainmentDataGrid(dataDisplayDelegate);
|
| this._retainmentDataGrid.show(this._retainmentView.element);
|
| this._retainmentDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._inspectedObjectChanged, this);
|
| this._retainmentDataGrid.reset();
|
| @@ -1225,7 +1226,7 @@ WebInspector.HeapSnapshotProfileType.prototype = {
|
| profile.title = WebInspector.UIString("Snapshot %d", profile.uid);
|
| profile._finishLoad();
|
| this._profileBeingRecorded = null;
|
| - WebInspector.panels.profiles.showProfile(profile);
|
| + this.dispatchEventToListeners(WebInspector.ProfileType.Events.ProfileComplete, profile);
|
| callback();
|
| }
|
| HeapProfilerAgent.takeHeapSnapshot(true, didTakeHeapSnapshot.bind(this));
|
| @@ -1414,7 +1415,7 @@ WebInspector.TrackingHeapSnapshotProfileType.prototype = {
|
| profile._finishLoad();
|
| this._profileSamples = null;
|
| this._profileBeingRecorded = null;
|
| - WebInspector.panels.profiles.showProfile(profile);
|
| + this.dispatchEventToListeners(WebInspector.ProfileType.Events.ProfileComplete, profile);
|
| }
|
|
|
| HeapProfilerAgent.stopTrackingHeapObjects(true, didTakeHeapSnapshot.bind(this));
|
| @@ -1502,20 +1503,22 @@ WebInspector.HeapProfileHeader = function(target, type, title)
|
| WebInspector.HeapProfileHeader.prototype = {
|
| /**
|
| * @override
|
| + * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate
|
| * @return {!WebInspector.ProfileSidebarTreeElement}
|
| */
|
| - createSidebarTreeElement: function()
|
| + createSidebarTreeElement: function(dataDisplayDelegate)
|
| {
|
| - return new WebInspector.ProfileSidebarTreeElement(this, "heap-snapshot-sidebar-tree-item");
|
| + return new WebInspector.ProfileSidebarTreeElement(dataDisplayDelegate, this, "heap-snapshot-sidebar-tree-item");
|
| },
|
|
|
| /**
|
| * @override
|
| + * @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate
|
| * @return {!WebInspector.HeapSnapshotView}
|
| */
|
| - createView: function()
|
| + createView: function(dataDisplayDelegate)
|
| {
|
| - return new WebInspector.HeapSnapshotView(this);
|
| + return new WebInspector.HeapSnapshotView(dataDisplayDelegate, this);
|
| },
|
|
|
| /**
|
|
|