Changeset 112262 in webkit


Ignore:
Timestamp:
Mar 27, 2012 7:23:22 AM (12 years ago)
Author:
yurys@chromium.org
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 <alexeif@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:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r112254 r112262  
     12012-03-27  Alexei Filippov  <alexeif@chromium.org>
     2
     3        Web Inspector: Fix missing objects in the dominators view.
     4        https://bugs.webkit.org/show_bug.cgi?id=82194
     5
     6        Due to the nature of dominators tree it is not possible to hide internal
     7        objects there because they may happen to contain user objects that can't
     8        be hidden.
     9        Besides that it fixes a small bug in HeapSnapshotArraySlice.slice
     10        function.
     11
     12        Reviewed by Yury Semikhatsky.
     13
     14        * inspector/profiler/heap-snapshot-expected.txt:
     15        * inspector/profiler/heap-snapshot.html:
     16
    1172012-03-27  Alexis Menard  <alexis.menard@openbossa.org>
    218
  • trunk/LayoutTests/inspector/profiler/heap-snapshot-expected.txt

    r112222 r112262  
    2020Running: heapSnapshotFlagsTest
    2121
     22Running: heapSnapshotArraySliceTest
     23
    2224Running: heapSnapshotNodesProviderTest
    2325
  • trunk/LayoutTests/inspector/profiler/heap-snapshot.html

    r112222 r112262  
    173173        },
    174174
     175        function heapSnapshotArraySliceTest(next)
     176        {
     177            var snapshot = new WebInspector.HeapSnapshot(InspectorTest.createHeapSnapshotMock());
     178            var root = snapshot.rootNode;
     179            var rawEdges = root.rawEdges;
     180            InspectorTest.assertEquals(6, rawEdges.length);
     181            InspectorTest.assertEquals(6, rawEdges.slice(0).length);
     182            InspectorTest.assertEquals(3, rawEdges.slice(3).length);
     183            InspectorTest.assertEquals(3, rawEdges.slice(3, 6).length);
     184            InspectorTest.assertEquals(3, rawEdges.slice(0, 3).length);
     185            InspectorTest.assertEquals(0, rawEdges.slice(3, 3).length);
     186            next();
     187        },
     188
    175189        function heapSnapshotNodesProviderTest(next)
    176190        {
  • trunk/Source/WebCore/ChangeLog

    r112259 r112262  
     12012-03-27  Alexei Filippov  <alexeif@chromium.org>
     2
     3        Web Inspector: Fix missing objects in the dominators view.
     4        https://bugs.webkit.org/show_bug.cgi?id=82194
     5
     6        Due to the nature of dominators tree it is not possible to hide internal
     7        objects there because they may happen to contain user objects that can't
     8        be hidden.
     9        Besides that it fixes a small bug in HeapSnapshotArraySlice.slice
     10        function.
     11
     12        Reviewed by Yury Semikhatsky.
     13
     14        * inspector/front-end/DetailedHeapshotGridNodes.js:
     15        (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
     16        * inspector/front-end/HeapSnapshot.js:
     17        (WebInspector.HeapSnapshotArraySlice.prototype.slice):
     18
    1192012-03-27  Antti Koivisto  <antti@apple.com>
    220
  • trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js

    r111512 r112262  
    504504    _createProvider: function(snapshot, nodeIndex)
    505505    {
    506         var showHiddenData = WebInspector.DetailedHeapshotView.prototype.showHiddenData;
     506        var showHiddenData = WebInspector.settings.showHeapSnapshotObjectsHiddenProperties.get();
    507507        return snapshot.createEdgesProvider(
    508508            nodeIndex,
     
    837837    _createProvider: function(snapshot, nodeIndex)
    838838    {
    839         var showHiddenData = WebInspector.DetailedHeapshotView.prototype.showHiddenData;
    840839        return snapshot.createNodesProviderForDominator(nodeIndex,
    841             "function (node) {" +
    842             "     return " + showHiddenData + " || !node.isHidden;" +
    843             "}");
     840            "function (node) { return true; }");
    844841    },
    845842
  • trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js

    r112225 r112262  
    231231    {
    232232        if (typeof end === "undefined")
    233             end = start + this._start + this.length;
    234         return this._snapshot[this._arrayName].subarray(this._start + start, end);
     233            end = this.length;
     234        return this._snapshot[this._arrayName].subarray(this._start + start, this._start + end);
    235235    }
    236236}
Note: See TracChangeset for help on using the changeset viewer.