Title: [115189] trunk
Revision
115189
Author
yu...@chromium.org
Date
2012-04-25 05:32:01 -0700 (Wed, 25 Apr 2012)

Log Message

Web Inspector: use composite node provider for diff nodes in heap profiler
https://bugs.webkit.org/show_bug.cgi?id=84849

Inroduced HeapSnapshotDiffNodesProvider which is basically a composite provider
combining providers for added and deleted nodes. This allowed to remove custom
implementation of HeapSnapshotGridNode.prototype.populateChildren.

Source/WebCore:

Reviewed by Pavel Feldman.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotNodesProvider.prototype.sort.sortByNodeField): moved index assignment to sortByComparator
so that it is done only once.
(WebInspector.HeapSnapshotNodesProvider.prototype.sort.sortByComparator):
(WebInspector.HeapSnapshotNodesProvider.prototype.sort):
* inspector/front-end/HeapSnapshotGridNodes.js:
(WebInspector.HeapSnapshotGridNode):
(WebInspector.HeapSnapshotGridNode.prototype.populateChildren.callSerialize):
(WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved.notify):
(WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved):
(WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
(WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort):
(WebInspector.HeapSnapshotGridNode.prototype.sort):
(WebInspector.HeapSnapshotDiffNodesProvider):
(WebInspector.HeapSnapshotDiffNodesProvider.prototype.dispose):
(WebInspector.HeapSnapshotDiffNodesProvider.prototype.isEmpty):
(WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems):
(WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems.didReceiveDeletedItems):
(WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems.didReceiveAddedItems):
(WebInspector.HeapSnapshotDiffNodesProvider.prototype.sortAndRewind.afterSort):
(WebInspector.HeapSnapshotDiffNodesProvider.prototype.sortAndRewind):
(WebInspector.HeapSnapshotDiffNode):
(WebInspector.HeapSnapshotDiffNode._createProvider):
(WebInspector.HeapSnapshotDiffNode.prototype._createChildNode):

LayoutTests:

       Reviewed by Pavel Feldman.

* inspector/profiler/heap-snapshot-comparison-expansion-preserved-when-sorting.html:
* inspector/profiler/heap-snapshot-comparison-show-all.html:
* inspector/profiler/heap-snapshot-comparison-shown-node-count-preserved-when-sorting.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (115188 => 115189)


--- trunk/LayoutTests/ChangeLog	2012-04-25 12:25:13 UTC (rev 115188)
+++ trunk/LayoutTests/ChangeLog	2012-04-25 12:32:01 UTC (rev 115189)
@@ -1,3 +1,18 @@
+2012-04-25  Yury Semikhatsky  <yu...@chromium.org>
+
+        Web Inspector: use composite node provider for diff nodes in heap profiler
+        https://bugs.webkit.org/show_bug.cgi?id=84849
+
+        Inroduced HeapSnapshotDiffNodesProvider which is basically a composite provider
+        combining providers for added and deleted nodes. This allowed to remove custom
+        implementation of HeapSnapshotGridNode.prototype.populateChildren.
+
+       Reviewed by Pavel Feldman.
+
+        * inspector/profiler/heap-snapshot-comparison-expansion-preserved-when-sorting.html:
+        * inspector/profiler/heap-snapshot-comparison-show-all.html:
+        * inspector/profiler/heap-snapshot-comparison-shown-node-count-preserved-when-sorting.html:
+
 2012-04-25  Szilard Ledan  <szle...@inf.u-szeged.hu>
 
         [Qt] Gardening. Skipped a failing test.

Modified: trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-expansion-preserved-when-sorting.html (115188 => 115189)


--- trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-expansion-preserved-when-sorting.html	2012-04-25 12:25:13 UTC (rev 115188)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-expansion-preserved-when-sorting.html	2012-04-25 12:32:01 UTC (rev 115189)
@@ -38,19 +38,10 @@
                 {
                     var buttonsNode = InspectorTest.findButtonsNode(row);
                     InspectorTest.assertEquals(true, !!buttonsNode, "no buttons node found!");
-                    InspectorTest.clickShowMoreButton("showAll", buttonsNode, step3);
+                    InspectorTest.clickShowMoreButton("showAll", buttonsNode, step4);
                 }
             }
 
-            function step3()
-            {
-                var row = InspectorTest.findRow("object", "B");
-                InspectorTest.assertEquals(true, !!row, "\"B\" row");
-                var buttonsNode = InspectorTest.findButtonsNode(row);
-                InspectorTest.assertEquals(true, !!buttonsNode, "no buttons node found!");
-                InspectorTest.clickShowMoreButton("showAll", buttonsNode, step4);
-            }
-
             var columns;
             function step4()
             {

Modified: trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-show-all.html (115188 => 115189)


--- trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-show-all.html	2012-04-25 12:25:13 UTC (rev 115188)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-show-all.html	2012-04-25 12:32:01 UTC (rev 115189)
@@ -37,46 +37,37 @@
             }
 
             var countA;
+            var countB;
             function step3(row)
             {
-                countA = row.data["addedCount"];
+                countA = row._addedCount;
                 InspectorTest.assertEquals(true, countA > 0, "countA > 0");
+                countB = row._removedCount;
+                InspectorTest.assertEquals(true, countB > 0, "countB > 0");
+
                 var buttonsNode = InspectorTest.findButtonsNode(row);
                 InspectorTest.assertEquals(true, !!buttonsNode, "buttons node (added)");
                 var words = buttonsNode.showAll.textContent.split(" ");
                 for (var i = 0; i < words.length; ++i) {
                     var maybeNumber = parseInt(words[i], 10);
                     if (!isNaN(maybeNumber))
-                        InspectorTest.assertEquals(countA, words[i], buttonsNode.showAll.textContent);
+                        InspectorTest.assertEquals(countA + countB, maybeNumber, buttonsNode.showAll.textContent);
                 }
                 InspectorTest.clickShowMoreButton("showAll", buttonsNode, step4);
             }
 
-            var countB;
             function step4(row)
             {
                 var rowsShown = InspectorTest.countDataRows(row, function(node) { return node.data.addedCount; });
-                InspectorTest.assertEquals(countA, rowsShown.toString(), "after showAll click 1");
+                InspectorTest.assertEquals(countA, rowsShown, "after showAll click 1");
 
-                countB = row.data["removedCount"];
+                countB = row._removedCount;
                 InspectorTest.assertEquals(true, countB > 0, "countB > 0");
                 var buttonsNode = InspectorTest.findButtonsNode(row);
-                InspectorTest.assertEquals(true, !!buttonsNode, "buttons node (deleted)");
-                var words = buttonsNode.showAll.textContent.split(" ");
-                for (var i = 0; i < words.length; ++i) {
-                    var maybeNumber = parseInt(words[i], 10);
-                    if (!isNaN(maybeNumber))
-                        InspectorTest.assertEquals(countB, words[i], buttonsNode.showAll.textContent);
-                }
-                InspectorTest.clickShowMoreButton("showAll", buttonsNode, step5);
-            }
+                InspectorTest.assertEquals(false, !!buttonsNode, "buttons node (deleted)");
 
-            function step5(row)
-            {
-                var rowsShown = InspectorTest.countDataRows(row, function(node) { return node.data.removedCount; });
-                InspectorTest.assertEquals(countB, rowsShown.toString(), "after showAll click 2");
-                var buttonsNode = InspectorTest.findButtonsNode(row);
-                InspectorTest.assertEquals(false, !!buttonsNode, "buttons node found after all rows shown");
+                var deletedRowsShown = InspectorTest.countDataRows(row, function(node) { return node.data.removedCount; });
+                InspectorTest.assertEquals(countB, deletedRowsShown, "deleted rows shown");
                 setTimeout(next, 0);
             }
         }

Modified: trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-shown-node-count-preserved-when-sorting.html (115188 => 115189)


--- trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-shown-node-count-preserved-when-sorting.html	2012-04-25 12:25:13 UTC (rev 115188)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot-comparison-shown-node-count-preserved-when-sorting.html	2012-04-25 12:32:01 UTC (rev 115189)
@@ -45,7 +45,7 @@
                 {
                     var buttonsNode = InspectorTest.findButtonsNode(row);
                     InspectorTest.assertEquals(true, !!buttonsNode, "no buttons node found!");
-                    InspectorTest.clickShowMoreButton("showNext", buttonsNode, step4);
+                    InspectorTest.clickShowMoreButton("showAll", buttonsNode, step4);
                 }
             }
 
@@ -60,12 +60,12 @@
                 var bInstanceRow = InspectorTest.findRow2(deletedNodeMatcher, row);
                 InspectorTest.assertEquals(true, !!bInstanceRow, "\"B\" instance row");
                 var buttonsNode = InspectorTest.findButtonsNode(row, bInstanceRow);
-                InspectorTest.assertEquals(true, !!buttonsNode, "no buttons node found!");
-                InspectorTest.clickShowMoreButton("showNext", buttonsNode, step5);
+                InspectorTest.assertEquals(false, !!buttonsNode, "buttons node found!");
+                step5();
             }
 
             var nodeCount;
-            function step5(row)
+            function step5()
             {
                 nodeCount = InspectorTest.columnContents(columns[0]).length;
                 InspectorTest.assertEquals(true, nodeCount > 0, "nodeCount > 0");

Modified: trunk/Source/WebCore/ChangeLog (115188 => 115189)


--- trunk/Source/WebCore/ChangeLog	2012-04-25 12:25:13 UTC (rev 115188)
+++ trunk/Source/WebCore/ChangeLog	2012-04-25 12:32:01 UTC (rev 115189)
@@ -1,3 +1,39 @@
+2012-04-25  Yury Semikhatsky  <yu...@chromium.org>
+
+        Web Inspector: use composite node provider for diff nodes in heap profiler
+        https://bugs.webkit.org/show_bug.cgi?id=84849
+
+        Inroduced HeapSnapshotDiffNodesProvider which is basically a composite provider
+        combining providers for added and deleted nodes. This allowed to remove custom
+        implementation of HeapSnapshotGridNode.prototype.populateChildren.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/HeapSnapshot.js:
+        (WebInspector.HeapSnapshotNodesProvider.prototype.sort.sortByNodeField): moved index assignment to sortByComparator
+        so that it is done only once.
+        (WebInspector.HeapSnapshotNodesProvider.prototype.sort.sortByComparator):
+        (WebInspector.HeapSnapshotNodesProvider.prototype.sort):
+        * inspector/front-end/HeapSnapshotGridNodes.js:
+        (WebInspector.HeapSnapshotGridNode):
+        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.callSerialize):
+        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved.notify):
+        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren.childrenRetrieved):
+        (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
+        (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort):
+        (WebInspector.HeapSnapshotGridNode.prototype.sort):
+        (WebInspector.HeapSnapshotDiffNodesProvider):
+        (WebInspector.HeapSnapshotDiffNodesProvider.prototype.dispose):
+        (WebInspector.HeapSnapshotDiffNodesProvider.prototype.isEmpty):
+        (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems):
+        (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems.didReceiveDeletedItems):
+        (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeNextItems.didReceiveAddedItems):
+        (WebInspector.HeapSnapshotDiffNodesProvider.prototype.sortAndRewind.afterSort):
+        (WebInspector.HeapSnapshotDiffNodesProvider.prototype.sortAndRewind):
+        (WebInspector.HeapSnapshotDiffNode):
+        (WebInspector.HeapSnapshotDiffNode._createProvider):
+        (WebInspector.HeapSnapshotDiffNode.prototype._createChildNode):
+
 2012-04-25  Nikolas Zimmermann  <nzimmerm...@rim.com>
 
         Refactor to/from/animatedType creation, to share more code between animators

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js (115188 => 115189)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js	2012-04-25 12:25:13 UTC (rev 115188)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js	2012-04-25 12:32:01 UTC (rev 115189)
@@ -1757,7 +1757,7 @@
         ++this._position;
     },
 
-    serializeNextItems: function(count)
+    serializeSubsequentItems: function(count)
     {
         this._createIterationOrder();
         var result = new Array(count);
@@ -1917,10 +1917,8 @@
         var nodeA = new WebInspector.HeapSnapshotNode(this.snapshot);
         var nodeB = new WebInspector.HeapSnapshotNode(this.snapshot);
 
-        function sortByNodeField(fieldName, ascending, indexA, indexB)
+        function sortByNodeField(fieldName, ascending)
         {
-            nodeA.nodeIndex = indexA;
-            nodeB.nodeIndex = indexB;
             var valueA = nodeA[fieldName];
             var valueB = nodeB[fieldName];
             var result = valueA < valueB ? -1 : (valueA > valueB ? 1 : 0);
@@ -1928,9 +1926,11 @@
         }
 
         function sortByComparator(indexA, indexB) {
-            var result = sortByNodeField(fieldName1, ascending1, indexA, indexB);
+            nodeA.nodeIndex = indexA;
+            nodeB.nodeIndex = indexB;
+            var result = sortByNodeField(fieldName1, ascending1);
             if (result === 0)
-                result = sortByNodeField(fieldName2, ascending2, indexA, indexB);
+                result = sortByNodeField(fieldName2, ascending2);
             return result;
         }
 

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js (115188 => 115189)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js	2012-04-25 12:25:13 UTC (rev 115188)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js	2012-04-25 12:32:01 UTC (rev 115189)
@@ -33,16 +33,17 @@
  * @extends {WebInspector.DataGridNode}
  * @param {WebInspector.HeapSnapshotSortableDataGrid} tree
  * @param {boolean} hasChildren
- * @param {WebInspector.HeapSnapshotProviderProxy|WebInspector.HeapSnapshotIteratorsTuple} provider
+ * @param {WebInspector.HeapSnapshotProviderProxy|WebInspector.HeapSnapshotDiffNodesProvider} provider
  */
 WebInspector.HeapSnapshotGridNode = function(tree, hasChildren, provider)
 {
     WebInspector.DataGridNode.call(this, null, hasChildren);
     /**
-     * @type {WebInspector.HeapSnapshotProviderProxy|WebInspector.HeapSnapshotIteratorsTuple}
+     * @type {WebInspector.HeapSnapshotProviderProxy|WebInspector.HeapSnapshotDiffNodesProvider}
      */
     this._provider = provider;
     this._dataGrid = tree;
+    this._instanceCount = 0;
     this.addEventListener("populate", this._populate, this);
 }
 
@@ -107,7 +108,7 @@
         this.removeEventListener("populate", this._populate, this);
         function sorted(ignored)
         {
-            this.populateChildren();
+            this._populateChildren();
         }
         this._provider.sortAndRewind(this.comparator(), sorted.bind(this));
     },
@@ -116,15 +117,8 @@
      * @param {?number} howMany
      * @param {?number} atIndex
      */
-    populateChildren: function(provider, howMany, atIndex, afterPopulate, suppressNotifyAboutCompletion)
+    _populateChildren: function(howMany, atIndex, afterPopulate)
     {
-        if (!howMany && provider) {
-            howMany = provider.instanceCount;
-            provider.instanceCount = 0;
-        }
-        provider = provider || this._provider;
-        if (!("instanceCount" in provider))
-            provider.instanceCount = 0;
         howMany = howMany || this._dataGrid.defaultPopulateCount();
         atIndex = atIndex || this.children.length;
         var haveSavedChildren = !!this._savedChildren;
@@ -142,7 +136,7 @@
             if (part >= howMany)
                 return;
             part += this._dataGrid.defaultPopulateCount();
-            provider.serializeNextItems(this._dataGrid.defaultPopulateCount(), childrenRetrieved.bind(this));
+            this._provider.serializeSubsequentItems(this._dataGrid.defaultPopulateCount(), childrenRetrieved.bind(this));
         }
         function childrenRetrieved(items)
         {
@@ -156,25 +150,23 @@
                         continue;
                     }
                 }
-                this.insertChild(this._createChildNode(item, provider, this), atIndex++);
+                this.insertChild(this._createChildNode(item), atIndex++);
             }
-            provider.instanceCount += items.length;
+            this._instanceCount += items.length;
             if (part < howMany) {
                 setTimeout(callSerialize.bind(this), 0);
                 return;
             }
 
             if (items.hasNext)
-                this.insertChild(new WebInspector.ShowMoreDataGridNode(this.populateChildren.bind(this, provider), this._dataGrid.defaultPopulateCount(), length), atIndex++);
+                this.insertChild(new WebInspector.ShowMoreDataGridNode(this._populateChildren.bind(this), this._dataGrid.defaultPopulateCount(), length), atIndex++);
             if (afterPopulate)
                 afterPopulate();
-            if (!suppressNotifyAboutCompletion) {
-                function notify()
-                {
-                    this.dispatchEventToListeners("populate complete");
-                }
-                setTimeout(notify.bind(this), 0);
+            function notify()
+            {
+                this.dispatchEventToListeners("populate complete");
             }
+            setTimeout(notify.bind(this), 0);
         }
         setTimeout(callSerialize.bind(this), 0);
     },
@@ -210,7 +202,9 @@
                 }
                 this._dataGrid.recursiveSortingLeave();
             }
-            this.populateChildren(this._provider, null, null, afterPopulate.bind(this));
+            var instanceCount = this._instanceCount;
+            this._instanceCount = 0;
+            this._populateChildren(instanceCount, null, afterPopulate.bind(this));
         }
         this._provider.sortAndRewind(this.comparator(), afterSort.bind(this));
     }
@@ -689,33 +683,78 @@
 
 /**
  * @constructor
- * @param {WebInspector.HeapSnapshotProviderProxy} it1
- * @param {WebInspector.HeapSnapshotProviderProxy} it2
- * @param {WebInspector.HeapSnapshotProxy} baseSnapshot
- * @param {WebInspector.HeapSnapshotProxy} snapshot
+ * @extends {WebInspector.HeapSnapshotProviderProxy}
+ * @param {WebInspector.HeapSnapshotProviderProxy} addedNodesProvider
+ * @param {WebInspector.HeapSnapshotProviderProxy} deletedNodesProvider
  */
-WebInspector.HeapSnapshotIteratorsTuple = function(it1, it2, baseSnapshot, snapshot)
+WebInspector.HeapSnapshotDiffNodesProvider = function(addedNodesProvider, deletedNodesProvider, addedCount, removedCount)
 {
-    this._it1 = it1;
-    this._it2 = it2;
-    this.baseSnapshot = baseSnapshot;
-    this.snapshot = snapshot;
+    this._addedNodesProvider = addedNodesProvider;
+    this._deletedNodesProvider = deletedNodesProvider;
+    this._addedCount = addedCount;
+    this._removedCount = removedCount;
+    this._serializedItemsCount = 0;
 }
 
-WebInspector.HeapSnapshotIteratorsTuple.prototype = {
+WebInspector.HeapSnapshotDiffNodesProvider.prototype = {
     dispose: function()
     {
-        this._it1.dispose();
-        this._it2.dispose();
+        this._addedNodesProvider.dispose();
+        this._deletedNodesProvider.dispose();
     },
 
+    isEmpty: function(callback)
+    {
+        callback(false);
+    },
+
+    serializeSubsequentItems: function(count, callback)
+    {
+        function didReceiveAllItems(items)
+        {
+            this._serializedItemsCount += items.length;
+            items.totalLength = this._addedCount + this._removedCount;
+            callback(items);
+        }
+
+        function didReceiveDeletedItems(addedItems, items)
+        {
+            for (var i = 0; i < items.length; i++) {
+                items[i].isAddedNotRemoved = false;
+                addedItems.push(items[i]);
+            }
+            addedItems.hasNext = items.hasNext;
+            didReceiveAllItems.call(this, addedItems);
+        }
+
+        function didReceiveAddedItems(items)
+        {
+            for (var i = 0; i < items.length; i++)
+                items[i].isAddedNotRemoved = true;
+            if (items.length < count)
+                return this._deletedNodesProvider.serializeSubsequentItems(count - items.length, didReceiveDeletedItems.bind(this, items));
+
+            items.totalLength = this._addedCount + this._removedCount;
+            if (!items.hasNext)
+                items.hasNext = !!this._removedCount;
+            didReceiveAllItems.call(this, items);
+        }
+
+        if (this._serializedItemsCount < this._addedCount)
+            this._addedNodesProvider.serializeSubsequentItems(count, didReceiveAddedItems.bind(this));
+        else
+            this._deletedNodesProvider.serializeSubsequentItems(count, didReceiveDeletedItems.bind(this, []));
+    },
+
     sortAndRewind: function(comparator, callback)
     {
+        this._serializedItemsCount = 0;
+
         function afterSort(ignored)
         {
-            this._it2.sortAndRewind(comparator, callback);
+            this._deletedNodesProvider.sortAndRewind(comparator, callback);
         }
-        this._it1.sortAndRewind(comparator, afterSort.bind(this));
+        this._addedNodesProvider.sortAndRewind(comparator, afterSort.bind(this));
     }
 };
 
@@ -726,7 +765,7 @@
 WebInspector.HeapSnapshotDiffNode = function(tree, className, diffForClass)
 {
     WebInspector.HeapSnapshotGridNode.call(this, tree, true,
-        WebInspector.HeapSnapshotDiffNode._createProvider(tree, className, diffForClass.deletedIndexes));
+        WebInspector.HeapSnapshotDiffNode._createProvider(tree, className, diffForClass.deletedIndexes, diffForClass.addedCount, diffForClass.removedCount));
     this._name = className;
 
     this._addedCount = diffForClass.addedCount;
@@ -737,23 +776,22 @@
     this._sizeDelta = diffForClass.sizeDelta;
 }
 
-WebInspector.HeapSnapshotDiffNode._createProvider = function(tree, className, deletedIndexes)
+WebInspector.HeapSnapshotDiffNode._createProvider = function(tree, className, deletedIndexes, addedCount, removedCount)
 {
-    var result =  new WebInspector.HeapSnapshotIteratorsTuple(
+    var result =  new WebInspector.HeapSnapshotDiffNodesProvider(
         tree.snapshot.createAddedNodesProvider(tree.baseSnapshot.uid, className),
         tree.baseSnapshot.createDeletedNodesProvider(deletedIndexes),
-        tree.baseSnapshot,
-        tree.snapshot);
+        addedCount, removedCount);
     return result;
 }
 
 WebInspector.HeapSnapshotDiffNode.prototype = {
-    _createChildNode: function(item, provider)
+    _createChildNode: function(item)
     {
-        if (provider === this._provider._it1)
-            return new WebInspector.HeapSnapshotInstanceNode(this._dataGrid, null, this._provider.snapshot, item);
+        if (item.isAddedNotRemoved)
+            return new WebInspector.HeapSnapshotInstanceNode(this._dataGrid, null, this._dataGrid.snapshot, item);
         else
-            return new WebInspector.HeapSnapshotInstanceNode(this._dataGrid, this._provider.baseSnapshot, null, item);
+            return new WebInspector.HeapSnapshotInstanceNode(this._dataGrid, this._dataGrid.baseSnapshot, null, item);
     },
 
     _childHashForEntity: function(node)
@@ -782,24 +820,6 @@
         return WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.createComparator(sortFields);
     },
 
-    populateChildren: function(provider, howMany, atIndex, afterPopulate)
-    {
-        if (!provider && !howMany) {
-            var firstProviderPopulated = function()
-            {
-                WebInspector.HeapSnapshotGridNode.prototype.populateChildren.call(this, this._provider._it2, this._dataGrid.defaultPopulateCount(), atIndex, afterPopulate, false);
-            };
-            WebInspector.HeapSnapshotGridNode.prototype.populateChildren.call(this, this._provider._it1, this._dataGrid.defaultPopulateCount(), atIndex, firstProviderPopulated.bind(this), true);
-        } else if (!howMany) {
-            var firstProviderPopulated = function()
-            {
-                WebInspector.HeapSnapshotGridNode.prototype.populateChildren.call(this, this._provider._it2, null, atIndex, afterPopulate, false);
-            };
-            WebInspector.HeapSnapshotGridNode.prototype.populateChildren.call(this, this._provider._it1, null, atIndex, firstProviderPopulated.bind(this), true);
-        } else
-            WebInspector.HeapSnapshotGridNode.prototype.populateChildren.call(this, provider, howMany, atIndex, afterPopulate, false);
-    },
-
     _signForDelta: function(delta)
     {
         if (delta === 0)

Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js (115188 => 115189)


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js	2012-04-25 12:25:13 UTC (rev 115188)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js	2012-04-25 12:32:01 UTC (rev 115189)
@@ -491,9 +491,9 @@
         this.callGetter(callback, "isEmpty");
     },
 
-    serializeNextItems: function(count, callback)
+    serializeSubsequentItems: function(count, callback)
     {
-        this.callMethod(callback, "serializeNextItems", count);
+        this.callMethod(callback, "serializeSubsequentItems", count);
     },
 
     sortAndRewind: function(comparator, callback)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to