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

Unified Diff: Source/devtools/front_end/HeapSnapshotView.js

Issue 203403002: Show live objects with given allocation call stack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added more annotations Created 6 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/HeapSnapshotProxy.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/HeapSnapshotView.js
diff --git a/Source/devtools/front_end/HeapSnapshotView.js b/Source/devtools/front_end/HeapSnapshotView.js
index 0b1b69e4008c949b652ad918e4ac65ec032b1622..507a0897604c09240123a178dd07aaf5f5b1d1aa 100644
--- a/Source/devtools/front_end/HeapSnapshotView.js
+++ b/Source/devtools/front_end/HeapSnapshotView.js
@@ -79,6 +79,7 @@ WebInspector.HeapSnapshotView = function(profile)
if (WebInspector.experimentsSettings.allocationProfiler.isEnabled() && profile.profileType() === WebInspector.ProfileTypeRegistry.instance.trackingHeapSnapshotProfileType) {
this._allocationView = new WebInspector.VBox();
this._allocationDataGrid = new WebInspector.AllocationDataGrid();
+ this._allocationDataGrid.addEventListener(WebInspector.DataGrid.Events.SelectedNode, this._onSelectAllocationNode, this);
this._allocationDataGrid.show(this._allocationView.element);
}
@@ -368,6 +369,9 @@ WebInspector.HeapSnapshotView.DominatorPerspective.prototype = {
WebInspector.HeapSnapshotView.AllocationPerspective = function()
{
WebInspector.HeapSnapshotView.Perspective.call(this, WebInspector.UIString("Allocation"));
+ this._allocationSplitView = new WebInspector.SplitView(false, true, "heapSnapshotAllocationSplitViewState", 200, 200);
+ this._allocationSplitView.setMainElementConstraints(50, 100);
+ this._allocationSplitView.setSidebarElementConstraints(50, 100);
}
WebInspector.HeapSnapshotView.AllocationPerspective.prototype = {
@@ -377,7 +381,21 @@ WebInspector.HeapSnapshotView.AllocationPerspective.prototype = {
*/
activate: function(heapSnapshotView)
{
- heapSnapshotView._allocationView.show(heapSnapshotView.element);
+ heapSnapshotView._allocationView.show(this._allocationSplitView.mainElement());
+ heapSnapshotView._constructorsView.show(heapSnapshotView._splitView.mainElement());
+ heapSnapshotView._retainmentView.show(heapSnapshotView._splitView.sidebarElement());
+ heapSnapshotView._splitView.show(this._allocationSplitView.sidebarElement());
+ this._allocationSplitView.show(heapSnapshotView.element);
+ },
+
+ /**
+ * @override
+ * @param {!WebInspector.HeapSnapshotView} heapSnapshotView
+ */
+ deactivate: function(heapSnapshotView)
+ {
+ this._allocationSplitView.detach();
+ WebInspector.HeapSnapshotView.Perspective.prototype.deactivate.call(this, heapSnapshotView);
},
/**
@@ -741,6 +759,12 @@ WebInspector.HeapSnapshotView.prototype = {
this._inspectedObjectChanged(event);
},
+ _onSelectAllocationNode: function(event)
+ {
+ var selectedNode = event.target.selectedNode;
+ this._constructorsDataGrid.setAllocationNodeId(selectedNode.allocationNodeId());
+ },
+
_inspectedObjectChanged: function(event)
{
var selectedNode = event.target.selectedNode;
« no previous file with comments | « Source/devtools/front_end/HeapSnapshotProxy.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698