Title: [106778] trunk/Source/WebCore
Revision
106778
Author
[email protected]
Date
2012-02-05 23:52:59 -0800 (Sun, 05 Feb 2012)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (106777 => 106778)


--- trunk/Source/WebCore/ChangeLog	2012-02-06 07:39:40 UTC (rev 106777)
+++ trunk/Source/WebCore/ChangeLog	2012-02-06 07:52:59 UTC (rev 106778)
@@ -1,3 +1,18 @@
+2012-02-05  Ilya Tikhonovsky  <[email protected]>
+
+        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):
+
 2012-02-05  Peter Rybin  <[email protected]>
 
         Web Inspector: CodeGeneratorInspector.py: switch domain agents to formal interfaces in BackendDispatcher

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


--- trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js	2012-02-06 07:39:40 UTC (rev 106777)
+++ trunk/Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js	2012-02-06 07:52:59 UTC (rev 106778)
@@ -363,7 +363,7 @@
     this._referenceName = edge.name;
     this._referenceType = edge.type;
     this._propertyAccessor = edge.propertyAccessor;
-    this._retainerNode = tree.showRetainingEdges;
+    this.showRetainingEdges = tree.showRetainingEdges;
     this._isFromBaseSnapshot = isFromBaseSnapshot;
     this._provider = this._createProvider(!isFromBaseSnapshot ? tree.snapshot : tree.baseSnapshot, edge.nodeIndex, tree);
     this.updateHasChildren(parentGridNode);
@@ -372,7 +372,7 @@
 WebInspector.HeapSnapshotObjectNode.prototype = {
     updateHasChildren: function(parentGridNode)
     {
-        if (this._retainerNode) {
+        if (this.showRetainingEdges) {
             this._parentGridNode = parentGridNode;
             var ancestor = parentGridNode;
             while (ancestor) {
@@ -394,10 +394,11 @@
     _createProvider: function(snapshot, nodeIndex, tree)
     {
         var showHiddenData = WebInspector.settings.showHeapSnapshotObjectsHiddenProperties.get();
-        var filter = "function(edge) {" +
-            "    return !edge.isInvisible" +
-            "        && (" + showHiddenData + " || (!edge.isHidden && !edge.node.isHidden));" +
-            "}";
+        var filter = "function(edge) {\n" +
+            "    return !edge.isInvisible\n" +
+            "        && (" + !this.showRetainingEdges + " || (edge.node.id !== 1 && !edge.node.isArtificial))\n" +
+            "        && (" + showHiddenData + " || (!edge.isHidden && !edge.node.isHidden));\n" +
+            "}\n";
         if (tree.showRetainingEdges)
             return snapshot.createRetainingEdgesProvider(nodeIndex, filter);
         else
@@ -453,7 +454,7 @@
 
     _prefixObjectCell: function(div, data)
     {
-        if (this._retainerNode) {
+        if (this.showRetainingEdges) {
             if (this._cycledWithAncestorGridNode)
                 div.className += " cycled-ancessor-node";
             var referenceNameSpan = document.createElement("span");

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


--- trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js	2012-02-06 07:39:40 UTC (rev 106777)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js	2012-02-06 07:52:59 UTC (rev 106778)
@@ -566,6 +566,11 @@
         return this._type() === this._snapshot._nodeHiddenType;
     },
 
+    get isArtificial()
+    {
+        return this._type() === this._snapshot._nodeArtificialType;
+    },
+
     get isDOMWindow()
     {
         return this.name.substr(0, 9) === "DOMWindow";
@@ -706,6 +711,7 @@
         this._firstEdgeOffset = meta.fields.indexOf("children");
         this._nodeTypes = meta.types[this._nodeTypeOffset];
         this._nodeHiddenType = this._nodeTypes.indexOf("hidden");
+        this._nodeArtificialType = this._nodeTypes.indexOf("artificial");
         var edgesMeta = meta.types[this._firstEdgeOffset];
         this._edgeFieldsCount = edgesMeta.fields.length;
         this._edgeTypeOffset = edgesMeta.fields.indexOf("type");
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to