2011-03-29 Mikhail Naganov <mnaganov@chromium.org>
authormnaganov@chromium.org <mnaganov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 11:44:25 +0000 (11:44 +0000)
committermnaganov@chromium.org <mnaganov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 11:44:25 +0000 (11:44 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: [Chromium] Refactor HeapSnapshot-related code to
        make sure we don't return big amounts of data to forms.
        https://bugs.webkit.org/show_bug.cgi?id=57227

        * inspector/front-end/DetailedHeapshotGridNodes.js:
        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
        (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _countPercent):
        (WebInspector.HeapSnapshotObjectNode):
        (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
        (WebInspector.HeapSnapshotInstanceNode):
        (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
        (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
        (WebInspector.HeapSnapshotConstructorNode.prototype.get _countPercent):
        (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
        (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
        (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
        * inspector/front-end/DetailedHeapshotView.js:
        (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
        (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.setDataSource):
        * inspector/front-end/HeapSnapshot.js:
        (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
        (WebInspector.HeapSnapshotNode.prototype.get retainers):
        (WebInspector.HeapSnapshot):
        (WebInspector.HeapSnapshot.prototype.get _allNodes):
        (WebInspector.HeapSnapshot.prototype.get nodeCount):
        (WebInspector.HeapSnapshot.prototype.get rootNodeIndex):
        (WebInspector.HeapSnapshot.prototype.hasId):
        (WebInspector.HeapSnapshot.prototype.get nodeIds):
        (WebInspector.HeapSnapshot.prototype._retainersForNode):
        (WebInspector.HeapSnapshot.prototype._buildRetainers):
        (WebInspector.HeapSnapshot.prototype._buildAggregates):
        (WebInspector.HeapSnapshot.prototype._buildAggregatesIndexes):
        (WebInspector.HeapSnapshot.prototype._buildIdsList):
        (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
        (WebInspector.HeapSnapshotFilteredOrderedIterator):
        (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
        (WebInspector.HeapSnapshotEdgesProvider):
        (WebInspector.HeapSnapshotNodesProvider):

2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: [Chromium] Refactor HeapSnapshot-related code to
        make sure we don't return big amounts of data to forms.
        https://bugs.webkit.org/show_bug.cgi?id=57227

        * inspector/profiler/heap-snapshot.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82230 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/inspector/profiler/heap-snapshot.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js
Source/WebCore/inspector/front-end/DetailedHeapshotView.js
Source/WebCore/inspector/front-end/HeapSnapshot.js

index 7563c10..a987bbf 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: [Chromium] Refactor HeapSnapshot-related code to
+        make sure we don't return big amounts of data to forms.
+        https://bugs.webkit.org/show_bug.cgi?id=57227
+
+        * inspector/profiler/heap-snapshot.html:
+
 2011-03-29  Yuta Kitamura  <yutak@chromium.org>
 
         Unreviewed, updating Chromium test expectations.
index 9b59637..1c04f62 100644 (file)
@@ -90,7 +90,7 @@ function test()
         function heapSnapshotSimpleTest(next)
         {
             var snapshot = new WebInspector.HeapSnapshot(InspectorTest.createHeapSnapshotMock());
-            InspectorTest.assertEquals(6, snapshot.nodesCount, "nodes count");
+            InspectorTest.assertEquals(6, snapshot.nodeCount, "node count");
             InspectorTest.assertEquals(20, snapshot.totalSize, "total size");
             next();
         },
@@ -116,7 +116,7 @@ function test()
                 "C": ["A", "B"],
                 "D": ["B"],
                 "E": ["C"]};
-            for (var nodes = snapshot.allNodes; nodes.hasNext(); nodes.next()) {
+            for (var nodes = snapshot._allNodes; nodes.hasNext(); nodes.next()) {
                 var names = [];
                 for (var retainers = nodes.item.retainers; retainers.hasNext(); retainers.next())
                     names.push(retainers.item.node.name);
@@ -168,7 +168,7 @@ function test()
                 return node.type === "object" && node.name !== "B" && node.name !== "D";
             }
          
-            var provider = new WebInspector.HeapSnapshotNodesProvider(snapshot, snapshot.allNodes, nodeFilter);
+            var provider = new WebInspector.HeapSnapshotNodesProvider(snapshot, nodeFilter);
             // Sort by names in reverse order.
             provider.sort(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.createComparator(["name", false, "id", false]));
             InspectorTest.assertEquals(3, provider.length, "nodes provider length");
@@ -188,7 +188,7 @@ function test()
                 return edge.name === "b";
             }
          
-            var provider = new WebInspector.HeapSnapshotEdgesProvider(snapshot, snapshot.rootNode.rawEdges, edgeFilter);
+            var provider = new WebInspector.HeapSnapshotEdgesProvider(snapshot, snapshot.rootNodeIndex, edgeFilter);
             provider.sort(WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.createComparator(["!edgeName", false, "id", false]));
             InspectorTest.assertEquals(1, provider.length, "edges provider length");
             var names = [];
@@ -209,7 +209,7 @@ function test()
                 50: ["A@2[1].bd", "B@3.bd"],
                 57: ["A@2.ac.ce", "A@2[1].bc.ce", "B@3.bc.ce"]
             };
-            for (var nodes = snapshot.allNodes; nodes.hasNext(); nodes.next()) {
+            for (var nodes = snapshot._allNodes; nodes.hasNext(); nodes.next()) {
                 var pathFinder = new WebInspector.HeapSnapshotPathFinder(snapshot, nodes.index);
                 var paths = [];
                 var path;
index b1a5214..a4bde62 100644 (file)
@@ -2,6 +2,49 @@
 
         Reviewed by Pavel Feldman.
 
+        Web Inspector: [Chromium] Refactor HeapSnapshot-related code to
+        make sure we don't return big amounts of data to forms.
+        https://bugs.webkit.org/show_bug.cgi?id=57227
+
+        * inspector/front-end/DetailedHeapshotGridNodes.js:
+        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
+        (WebInspector.HeapSnapshotGenericObjectNode.prototype.get _countPercent):
+        (WebInspector.HeapSnapshotObjectNode):
+        (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
+        (WebInspector.HeapSnapshotInstanceNode):
+        (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
+        (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
+        (WebInspector.HeapSnapshotConstructorNode.prototype.get _countPercent):
+        (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
+        (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
+        (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
+        * inspector/front-end/DetailedHeapshotView.js:
+        (WebInspector.HeapSnapshotContainmentDataGrid.prototype.setDataSource):
+        (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.setDataSource):
+        * inspector/front-end/HeapSnapshot.js:
+        (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
+        (WebInspector.HeapSnapshotNode.prototype.get retainers):
+        (WebInspector.HeapSnapshot):
+        (WebInspector.HeapSnapshot.prototype.get _allNodes):
+        (WebInspector.HeapSnapshot.prototype.get nodeCount):
+        (WebInspector.HeapSnapshot.prototype.get rootNodeIndex):
+        (WebInspector.HeapSnapshot.prototype.hasId):
+        (WebInspector.HeapSnapshot.prototype.get nodeIds):
+        (WebInspector.HeapSnapshot.prototype._retainersForNode):
+        (WebInspector.HeapSnapshot.prototype._buildRetainers):
+        (WebInspector.HeapSnapshot.prototype._buildAggregates):
+        (WebInspector.HeapSnapshot.prototype._buildAggregatesIndexes):
+        (WebInspector.HeapSnapshot.prototype._buildIdsList):
+        (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
+        (WebInspector.HeapSnapshotFilteredOrderedIterator):
+        (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.next):
+        (WebInspector.HeapSnapshotEdgesProvider):
+        (WebInspector.HeapSnapshotNodesProvider):
+
+2011-03-29  Mikhail Naganov  <mnaganov@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
         Web Inspector: [Chromium] Fix detailed heap snapshots UI.
         https://bugs.webkit.org/show_bug.cgi?id=57235
 
index acf3280..4aa326c 100644 (file)
@@ -61,8 +61,8 @@ WebInspector.HeapSnapshotGridNode.prototype = {
     populateChildren: function(provider, howMany, atIndex)
     {
         if (!howMany && provider) {
-            howMany = provider.instancesCount;
-            provider.resetInstancesCount();
+            howMany = provider.instanceCount;
+            provider.instanceCount = 0;
         }
         provider = provider || this._provider;
         howMany = howMany || this._defaultPopulateCount;
@@ -75,7 +75,7 @@ WebInspector.HeapSnapshotGridNode.prototype = {
                 break;
             }
         }
-        for ( ; howMany > 0 && provider.hasNext(); provider.next(), provider.incInstancesCount(), --howMany) {
+        for ( ; howMany > 0 && provider.hasNext(); provider.next(), ++provider.instanceCount, --howMany) {
             var item = provider.item;
             if (haveSavedChildren) {
                 var hash = this._childHashForEntity(item);
@@ -168,7 +168,7 @@ WebInspector.HeapSnapshotGenericObjectNode.prototype = {
 
     get _countPercent()
     {
-        return this._count / this.tree.snapshot.nodesCount * 100.0;
+        return this._count / this.tree.snapshot.nodeCount * 100.0;
     },
 
     get data()
@@ -231,9 +231,8 @@ WebInspector.HeapSnapshotGenericObjectNode.prototype.__proto__ = WebInspector.He
 
 WebInspector.HeapSnapshotObjectNode = function(tree, edge)
 {
-    var node = edge.node;
-    var provider = this._createProvider(tree.snapshot, node.rawEdges);
-    WebInspector.HeapSnapshotGenericObjectNode.call(this, tree, node, !provider.isEmpty, 100);
+    var provider = this._createProvider(tree.snapshot, edge.nodeIndex);
+    WebInspector.HeapSnapshotGenericObjectNode.call(this, tree, edge.node, !provider.isEmpty, 100);
     this._referenceName = edge.name;
     this._referenceType = edge.type;
     this._provider = provider;
@@ -245,12 +244,12 @@ WebInspector.HeapSnapshotObjectNode.prototype = {
         return new WebInspector.HeapSnapshotObjectNode(this.dataGrid, provider.item);
     },
 
-    _createProvider: function(snapshot, rawEdges)
+    _createProvider: function(snapshot, nodeIndex)
     {
         var showHiddenData = WebInspector.DetailedHeapshotView.prototype.showHiddenData;
         return new WebInspector.HeapSnapshotEdgesProvider(
             snapshot,
-            rawEdges,
+            nodeIndex,
             function(edge) {
                 return !edge.isInvisible
                     && (showHiddenData || (!edge.isHidden && !edge.node.isHidden));
@@ -321,7 +320,7 @@ WebInspector.HeapSnapshotObjectNode.prototype.__proto__ = WebInspector.HeapSnaps
 
 WebInspector.HeapSnapshotInstanceNode = function(tree, baseSnapshot, snapshot, node)
 {
-    var provider = this._createProvider(baseSnapshot || snapshot, node.rawEdges);  
+    var provider = this._createProvider(baseSnapshot || snapshot, node.nodeIndex);  
     WebInspector.HeapSnapshotGenericObjectNode.call(this, tree, node, !provider.isEmpty, 100);
     this._isDeletedNode = !!baseSnapshot;
     this._provider = provider;    
@@ -333,12 +332,12 @@ WebInspector.HeapSnapshotInstanceNode.prototype = {
         return new WebInspector.HeapSnapshotObjectNode(this.dataGrid, provider.item);
     },
 
-    _createProvider: function(snapshot, rawEdges)
+    _createProvider: function(snapshot, nodeIndex)
     {
         var showHiddenData = WebInspector.DetailedHeapshotView.prototype.showHiddenData;
         return new WebInspector.HeapSnapshotEdgesProvider(
             snapshot,
-            rawEdges,
+            nodeIndex,
             function(edge) {
                 return !edge.isInvisible
                     && (showHiddenData || (!edge.isHidden && !edge.node.isHidden));
@@ -414,7 +413,6 @@ WebInspector.HeapSnapshotConstructorNode.prototype = {
     {
         return new WebInspector.HeapSnapshotNodesProvider(
             snapshot,
-            snapshot.allNodes,
             function (node) {
                  return node.type === nodeType
                     && (nodeClassName === null || node.className === nodeClassName);
@@ -456,7 +454,7 @@ WebInspector.HeapSnapshotConstructorNode.prototype = {
 
     get _countPercent()
     {
-        return this._count / this.dataGrid.snapshot.nodesCount * 100.0;
+        return this._count / this.dataGrid.snapshot.nodeCount * 100.0;
     },
 
     get _retainedSizePercent()
@@ -485,12 +483,6 @@ WebInspector.HeapSnapshotIteratorsTuple.prototype = {
         this._it2.first();
     },
 
-    resetInstancesCount: function()
-    {
-        this._it1.resetInstancesCount();
-        this._it2.resetInstancesCount();
-    },
-
     sort: function(comparator)
     {
         this._it1.sort(comparator);
@@ -568,7 +560,6 @@ WebInspector.HeapSnapshotDiffNode.prototype = {
         {
             return new WebInspector.HeapSnapshotNodesProvider(
                 snapshot,
-                snapshot.allNodes,
                 function (node) {
                      return node.type === nodeType
                          && (nodeClassName === null || node.className === nodeClassName)
@@ -655,9 +646,8 @@ WebInspector.HeapSnapshotDominatorObjectNode.prototype = {
         var showHiddenData = WebInspector.DetailedHeapshotView.prototype.showHiddenData;
         return new WebInspector.HeapSnapshotNodesProvider(
             snapshot,
-            snapshot.allNodes,
             function (node) {
-                 var dominatorIndex = node.dominatorIndex();
+                 var dominatorIndex = node.dominatorIndex;
                  return dominatorIndex === nodeIndex
                      && dominatorIndex !== node.nodeIndex
                      && (showHiddenData || !node.isHidden);
index 5c56f15..237d4de 100644 (file)
@@ -45,8 +45,8 @@ WebInspector.HeapSnapshotContainmentDataGrid.prototype = {
     {
         this.snapshotView = snapshotView;
         this.snapshot = snapshot;
-        this.snapshotNodeIndex = this.snapshot._rootNodeIndex;
-        this._provider = this._createProvider(snapshot, snapshot.rootNode.rawEdges);
+        this.snapshotNodeIndex = this.snapshot.rootNodeIndex;
+        this._provider = this._createProvider(snapshot, this.snapshotNodeIndex);
         this.sort();
     }
 };
@@ -227,7 +227,7 @@ WebInspector.HeapSnapshotDominatorsDataGrid.prototype = {
     {
         this.snapshotView = snapshotView;
         this.snapshot = snapshot;
-        this.snapshotNodeIndex = this.snapshot._rootNodeIndex;
+        this.snapshotNodeIndex = this.snapshot.rootNodeIndex;
         this._provider = this._createProvider(snapshot, this.snapshotNodeIndex);
         this.sort();
     }
index af9b119..c9d1e30 100644 (file)
@@ -351,7 +351,7 @@ WebInspector.HeapSnapshotNode.prototype = {
         }
     },
 
-    dominatorIndex: function()
+    get dominatorIndex()
     {
         return this._nodes[this.nodeIndex + this._snapshot._dominatorOffset];
     },
@@ -404,7 +404,7 @@ WebInspector.HeapSnapshotNode.prototype = {
 
     get retainers()
     {
-        return new WebInspector.HeapSnapshotRetainerEdgeIterator(new WebInspector.HeapSnapshotRetainerEdge(this._snapshot, this._snapshot.retainers(this)));
+        return new WebInspector.HeapSnapshotRetainerEdgeIterator(new WebInspector.HeapSnapshotRetainerEdge(this._snapshot, this._snapshot._retainersForNode(this)));
     },
 
     get selfSize()
@@ -482,6 +482,7 @@ WebInspector.HeapSnapshotNodeIterator.prototype = {
 
 WebInspector.HeapSnapshot = function(profile)
 {
+    this.uid = profile.uid;
     this._nodes = profile.nodes;
     this._strings = profile.strings;
 
@@ -535,20 +536,20 @@ WebInspector.HeapSnapshot.prototype = {
         }
     },
 
-    get allNodes()
+    get _allNodes()
     {
         return new WebInspector.HeapSnapshotNodeIterator(this.rootNode);
     },
 
-    get nodesCount()
+    get nodeCount()
     {
-        if (this._nodesCount)
-            return this._nodesCount;
+        if (this._nodeCount)
+            return this._nodeCount;
 
-        this._nodesCount = 0;
-        for (var iter = this.allNodes; iter.hasNext(); iter.next())
-            ++this._nodesCount;
-        return this._nodesCount;
+        this._nodeCount = 0;
+        for (var iter = this._allNodes; iter.hasNext(); iter.next())
+            ++this._nodeCount;
+        return this._nodeCount;
     },
 
     restore: function(profile)
@@ -562,6 +563,11 @@ WebInspector.HeapSnapshot.prototype = {
         return new WebInspector.HeapSnapshotNode(this, this._rootNodeIndex);
     },
 
+    get rootNodeIndex()
+    {
+        return this._rootNodeIndex;
+    },
+
     get totalSize()
     {
         return this.rootNode.retainedSize;
@@ -569,12 +575,17 @@ WebInspector.HeapSnapshot.prototype = {
 
     hasId: function(id)
     {
+        return this.nodeIds.binaryIndexOf(id, this._numbersComparator) >= 0;
+    },
+
+    get nodeIds()
+    {
         if (!this._idsList)
             this._buildIdsList();
-        return this._idsList.binaryIndexOf(id, this._numbersComparator) >= 0;
+        return this._idsList;
     },
 
-    retainers: function(node)
+    _retainersForNode: function(node)
     {
         if (!this._retainers)
             this._buildRetainers();
@@ -601,7 +612,7 @@ WebInspector.HeapSnapshot.prototype = {
         this._retainerIndex = new Array(this._nodeIndex.length);
         for (var i = 0, l = this._retainerIndex.length; i < l; ++i)
             this._retainerIndex[i] = 0;
-        for (var nodesIter = this.allNodes; nodesIter.hasNext(); nodesIter.next()) {
+        for (var nodesIter = this._allNodes; nodesIter.hasNext(); nodesIter.next()) {
             var node = nodesIter.node;
             for (var edgesIter = node.edges; edgesIter.hasNext(); edgesIter.next()) {
                 var edge = edgesIter.edge;
@@ -620,7 +631,7 @@ WebInspector.HeapSnapshot.prototype = {
             this._retainerIndex[i] = retainerPosition;
             retainerPosition += retainerCount;
         }
-        for (nodesIter = this.allNodes; nodesIter.hasNext(); nodesIter.next()) {
+        for (nodesIter = this._allNodes; nodesIter.hasNext(); nodesIter.next()) {
             var node = nodesIter.node;
             for (var edgesIter = node.edges; edgesIter.hasNext(); edgesIter.next()) {
                 var edge = edgesIter.edge;
@@ -635,7 +646,7 @@ WebInspector.HeapSnapshot.prototype = {
     _buildAggregates: function()
     {
         this._aggregates = {};
-        for (var iter = this.allNodes; iter.hasNext(); iter.next()) {
+        for (var iter = this._allNodes; iter.hasNext(); iter.next()) {
             var node = iter.node;
             var className = node.className;
             var nameMatters = node.type === "object" || node.type === "native";
@@ -653,7 +664,7 @@ WebInspector.HeapSnapshot.prototype = {
 
     _buildAggregatesIndexes: function()
     {
-        for (var iter = this.allNodes; iter.hasNext(); iter.next()) {
+        for (var iter = this._allNodes; iter.hasNext(); iter.next()) {
             var node = iter.node;
             var className = node.className;
             var clss = this._aggregates[className];
@@ -677,10 +688,10 @@ WebInspector.HeapSnapshot.prototype = {
     _buildIdsList: function()
     {
         var count = 0;
-        for (var nodesIter = this.allNodes; nodesIter.hasNext(); nodesIter.next(), ++count);
+        for (var nodesIter = this._allNodes; nodesIter.hasNext(); nodesIter.next(), ++count);
         this._idsList = new Array(count);
         count = 0;
-        for (nodesIter = this.allNodes; nodesIter.hasNext(); nodesIter.next(), ++count)
+        for (nodesIter = this._allNodes; nodesIter.hasNext(); nodesIter.next(), ++count)
             this._idsList[count] = nodesIter.node.id;
         this._idsList.sort(this._numbersComparator);
     },
@@ -688,10 +699,10 @@ WebInspector.HeapSnapshot.prototype = {
     _buildNodeIndex: function()
     {
         var count = 0;
-        for (var nodesIter = this.allNodes; nodesIter.hasNext(); nodesIter.next(), ++count);
+        for (var nodesIter = this._allNodes; nodesIter.hasNext(); nodesIter.next(), ++count);
         this._nodeIndex = new Array(count + 1);
         count = 0;
-        for (nodesIter = this.allNodes; nodesIter.hasNext(); nodesIter.next(), ++count)
+        for (nodesIter = this._allNodes; nodesIter.hasNext(); nodesIter.next(), ++count)
             this._nodeIndex[count] = nodesIter.index;
         this._nodeIndex[count] = this._nodes.length;
     },
@@ -761,7 +772,6 @@ WebInspector.HeapSnapshotFilteredOrderedIterator = function(iterator, filter)
     this._iterationOrder = null;
     this._position = 0;
     this._lastComparator = null;
-    this._instancesCount = 0;
 }
 
 WebInspector.HeapSnapshotFilteredOrderedIterator.prototype = {
@@ -790,16 +800,6 @@ WebInspector.HeapSnapshotFilteredOrderedIterator.prototype = {
         return this._position < this._iterationOrder.length;
     },
 
-    incInstancesCount: function()
-    {
-        ++this._instancesCount;
-    },
-
-    get instancesCount()
-    {
-        return this._instancesCount;
-    },
-
     get isEmpty()
     {
         if (this._iterationOrder)
@@ -820,11 +820,6 @@ WebInspector.HeapSnapshotFilteredOrderedIterator.prototype = {
         return this._iterator.item;
     },
 
-    get lastComparator()
-    {
-        return this._lastComparator;
-    },
-
     get length()
     {
         if (!this._iterationOrder)
@@ -836,11 +831,6 @@ WebInspector.HeapSnapshotFilteredOrderedIterator.prototype = {
     {
         ++this._position;
     },
-
-    resetInstancesCount: function()
-    {
-        this._instancesCount = 0;
-    }
 }
 
 WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.createComparator = function(fieldNames)
@@ -848,10 +838,11 @@ WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.createComparator = fu
     return {fieldName1:fieldNames[0], ascending1:fieldNames[1], fieldName2:fieldNames[2], ascending2:fieldNames[3]};
 }
 
-WebInspector.HeapSnapshotEdgesProvider = function(snapshot, rawEdges, filter)
+WebInspector.HeapSnapshotEdgesProvider = function(snapshot, nodeIndex, filter)
 {
     this.snapshot = snapshot;
-    WebInspector.HeapSnapshotFilteredOrderedIterator.call(this, new WebInspector.HeapSnapshotEdgeIterator(new WebInspector.HeapSnapshotEdge(snapshot, rawEdges)), filter);
+    var node = new WebInspector.HeapSnapshotNode(snapshot, nodeIndex);
+    WebInspector.HeapSnapshotFilteredOrderedIterator.call(this, new WebInspector.HeapSnapshotEdgeIterator(new WebInspector.HeapSnapshotEdge(snapshot, node.rawEdges)), filter);
 }
 
 WebInspector.HeapSnapshotEdgesProvider.prototype = {
@@ -931,10 +922,10 @@ WebInspector.HeapSnapshotEdgesProvider.prototype = {
 
 WebInspector.HeapSnapshotEdgesProvider.prototype.__proto__ = WebInspector.HeapSnapshotFilteredOrderedIterator.prototype;
 
-WebInspector.HeapSnapshotNodesProvider = function(snapshot, nodes, filter)
+WebInspector.HeapSnapshotNodesProvider = function(snapshot, filter)
 {
     this.snapshot = snapshot;
-    WebInspector.HeapSnapshotFilteredOrderedIterator.call(this, nodes, filter);
+    WebInspector.HeapSnapshotFilteredOrderedIterator.call(this, snapshot._allNodes, filter);
 }
 
 WebInspector.HeapSnapshotNodesProvider.prototype = {