Changeset 106778 in webkit


Ignore:
Timestamp:
Feb 5, 2012 11:52:59 PM (12 years ago)
Author:
loislo@chromium.org
Message:

Web Inspector: get rid of artificial heap snapshot nodes from the retaining tree.
https://bugs.webkit.org/show_bug.cgi?id=77850

Reviewed by Yury Semikhatsky.

  • inspector/front-end/DetailedHeapshotGridNodes.js:

(WebInspector.HeapSnapshotObjectNode):
(WebInspector.HeapSnapshotObjectNode.prototype.updateHasChildren):
(WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell):

  • inspector/front-end/HeapSnapshot.js:

(WebInspector.HeapSnapshotNode.prototype.get isArtificial):
(WebInspector.HeapSnapshot.prototype._init):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106777 r106778  
     12012-02-05  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Web Inspector: get rid of artificial heap snapshot nodes from the retaining tree.
     4        https://bugs.webkit.org/show_bug.cgi?id=77850
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * inspector/front-end/DetailedHeapshotGridNodes.js:
     9        (WebInspector.HeapSnapshotObjectNode):
     10        (WebInspector.HeapSnapshotObjectNode.prototype.updateHasChildren):
     11        (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell):
     12        * inspector/front-end/HeapSnapshot.js:
     13        (WebInspector.HeapSnapshotNode.prototype.get isArtificial):
     14        (WebInspector.HeapSnapshot.prototype._init):
     15
    1162012-02-05  Peter Rybin  <peter.rybin@gmail.com>
    217
  • trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js

    r106755 r106778  
    364364    this._referenceType = edge.type;
    365365    this._propertyAccessor = edge.propertyAccessor;
    366     this._retainerNode = tree.showRetainingEdges;
     366    this.showRetainingEdges = tree.showRetainingEdges;
    367367    this._isFromBaseSnapshot = isFromBaseSnapshot;
    368368    this._provider = this._createProvider(!isFromBaseSnapshot ? tree.snapshot : tree.baseSnapshot, edge.nodeIndex, tree);
     
    373373    updateHasChildren: function(parentGridNode)
    374374    {
    375         if (this._retainerNode) {
     375        if (this.showRetainingEdges) {
    376376            this._parentGridNode = parentGridNode;
    377377            var ancestor = parentGridNode;
     
    395395    {
    396396        var showHiddenData = WebInspector.settings.showHeapSnapshotObjectsHiddenProperties.get();
    397         var filter = "function(edge) {" +
    398             "    return !edge.isInvisible" +
    399             "        && (" + showHiddenData + " || (!edge.isHidden && !edge.node.isHidden));" +
    400             "}";
     397        var filter = "function(edge) {\n" +
     398            "    return !edge.isInvisible\n" +
     399            "        && (" + !this.showRetainingEdges + " || (edge.node.id !== 1 && !edge.node.isArtificial))\n" +
     400            "        && (" + showHiddenData + " || (!edge.isHidden && !edge.node.isHidden));\n" +
     401            "}\n";
    401402        if (tree.showRetainingEdges)
    402403            return snapshot.createRetainingEdgesProvider(nodeIndex, filter);
     
    454455    _prefixObjectCell: function(div, data)
    455456    {
    456         if (this._retainerNode) {
     457        if (this.showRetainingEdges) {
    457458            if (this._cycledWithAncestorGridNode)
    458459                div.className += " cycled-ancessor-node";
  • trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js

    r106665 r106778  
    567567    },
    568568
     569    get isArtificial()
     570    {
     571        return this._type() === this._snapshot._nodeArtificialType;
     572    },
     573
    569574    get isDOMWindow()
    570575    {
     
    707712        this._nodeTypes = meta.types[this._nodeTypeOffset];
    708713        this._nodeHiddenType = this._nodeTypes.indexOf("hidden");
     714        this._nodeArtificialType = this._nodeTypes.indexOf("artificial");
    709715        var edgesMeta = meta.types[this._firstEdgeOffset];
    710716        this._edgeFieldsCount = edgesMeta.fields.length;
Note: See TracChangeset for help on using the changeset viewer.