Title: [112262] trunk
Revision
112262
Author
yu...@chromium.org
Date
2012-03-27 07:23:22 -0700 (Tue, 27 Mar 2012)

Log Message

Web Inspector: Fix missing objects in the dominators view.
https://bugs.webkit.org/show_bug.cgi?id=82194

Due to the nature of dominators tree it is not possible to hide internal
objects there because they may happen to contain user objects that can't
be hidden.
Besides that it fixes a small bug in HeapSnapshotArraySlice.slice
function.

Patch by Alexei Filippov <alex...@chromium.org> on 2012-03-27
Reviewed by Yury Semikhatsky.

Source/WebCore:

* inspector/front-end/DetailedHeapshotGridNodes.js:
(WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotArraySlice.prototype.slice):

LayoutTests:

* inspector/profiler/heap-snapshot-expected.txt:
* inspector/profiler/heap-snapshot.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (112261 => 112262)


--- trunk/LayoutTests/ChangeLog	2012-03-27 13:37:43 UTC (rev 112261)
+++ trunk/LayoutTests/ChangeLog	2012-03-27 14:23:22 UTC (rev 112262)
@@ -1,3 +1,19 @@
+2012-03-27  Alexei Filippov  <alex...@chromium.org>
+
+        Web Inspector: Fix missing objects in the dominators view.
+        https://bugs.webkit.org/show_bug.cgi?id=82194
+
+        Due to the nature of dominators tree it is not possible to hide internal
+        objects there because they may happen to contain user objects that can't
+        be hidden.
+        Besides that it fixes a small bug in HeapSnapshotArraySlice.slice
+        function.
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/profiler/heap-snapshot-expected.txt:
+        * inspector/profiler/heap-snapshot.html:
+
 2012-03-27  Alexis Menard  <alexis.men...@openbossa.org>
 
         Increase code sharing between CSSComputedStyleDeclaration and CSSPropertyLonghand.

Modified: trunk/LayoutTests/inspector/profiler/heap-snapshot-expected.txt (112261 => 112262)


--- trunk/LayoutTests/inspector/profiler/heap-snapshot-expected.txt	2012-03-27 13:37:43 UTC (rev 112261)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot-expected.txt	2012-03-27 14:23:22 UTC (rev 112262)
@@ -19,6 +19,8 @@
 
 Running: heapSnapshotFlagsTest
 
+Running: heapSnapshotArraySliceTest
+
 Running: heapSnapshotNodesProviderTest
 
 Running: heapSnapshotEdgesProviderTest

Modified: trunk/LayoutTests/inspector/profiler/heap-snapshot.html (112261 => 112262)


--- trunk/LayoutTests/inspector/profiler/heap-snapshot.html	2012-03-27 13:37:43 UTC (rev 112261)
+++ trunk/LayoutTests/inspector/profiler/heap-snapshot.html	2012-03-27 14:23:22 UTC (rev 112262)
@@ -172,6 +172,20 @@
             next();
         },
 
+        function heapSnapshotArraySliceTest(next)
+        {
+            var snapshot = new WebInspector.HeapSnapshot(InspectorTest.createHeapSnapshotMock());
+            var root = snapshot.rootNode;
+            var rawEdges = root.rawEdges;
+            InspectorTest.assertEquals(6, rawEdges.length);
+            InspectorTest.assertEquals(6, rawEdges.slice(0).length);
+            InspectorTest.assertEquals(3, rawEdges.slice(3).length);
+            InspectorTest.assertEquals(3, rawEdges.slice(3, 6).length);
+            InspectorTest.assertEquals(3, rawEdges.slice(0, 3).length);
+            InspectorTest.assertEquals(0, rawEdges.slice(3, 3).length);
+            next();
+        },
+
         function heapSnapshotNodesProviderTest(next)
         {
             var snapshot = new WebInspector.HeapSnapshot(InspectorTest.createHeapSnapshotMock());

Modified: trunk/Source/WebCore/ChangeLog (112261 => 112262)


--- trunk/Source/WebCore/ChangeLog	2012-03-27 13:37:43 UTC (rev 112261)
+++ trunk/Source/WebCore/ChangeLog	2012-03-27 14:23:22 UTC (rev 112262)
@@ -1,3 +1,21 @@
+2012-03-27  Alexei Filippov  <alex...@chromium.org>
+
+        Web Inspector: Fix missing objects in the dominators view.
+        https://bugs.webkit.org/show_bug.cgi?id=82194
+
+        Due to the nature of dominators tree it is not possible to hide internal
+        objects there because they may happen to contain user objects that can't
+        be hidden.
+        Besides that it fixes a small bug in HeapSnapshotArraySlice.slice
+        function.
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/DetailedHeapshotGridNodes.js:
+        (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
+        * inspector/front-end/HeapSnapshot.js:
+        (WebInspector.HeapSnapshotArraySlice.prototype.slice):
+
 2012-03-27  Antti Koivisto  <an...@apple.com>
 
         Remove Document::mappedElementSheet() 

Modified: trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js (112261 => 112262)


--- trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js	2012-03-27 13:37:43 UTC (rev 112261)
+++ trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js	2012-03-27 14:23:22 UTC (rev 112262)
@@ -503,7 +503,7 @@
 
     _createProvider: function(snapshot, nodeIndex)
     {
-        var showHiddenData = WebInspector.DetailedHeapshotView.prototype.showHiddenData;
+        var showHiddenData = WebInspector.settings.showHeapSnapshotObjectsHiddenProperties.get();
         return snapshot.createEdgesProvider(
             nodeIndex,
             "function(edge) {" +
@@ -836,11 +836,8 @@
 
     _createProvider: function(snapshot, nodeIndex)
     {
-        var showHiddenData = WebInspector.DetailedHeapshotView.prototype.showHiddenData;
         return snapshot.createNodesProviderForDominator(nodeIndex,
-            "function (node) {" +
-            "     return " + showHiddenData + " || !node.isHidden;" +
-            "}");
+            "function (node) { return true; }");
     },
 
     _childHashForEntity: function(node)

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


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js	2012-03-27 13:37:43 UTC (rev 112261)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js	2012-03-27 14:23:22 UTC (rev 112262)
@@ -230,8 +230,8 @@
     slice: function(start, end)
     {
         if (typeof end === "undefined")
-            end = start + this._start + this.length;
-        return this._snapshot[this._arrayName].subarray(this._start + start, end);
+            end = this.length;
+        return this._snapshot[this._arrayName].subarray(this._start + start, this._start + end);
     }
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to