Web Inspector: get rid of cycles in containment view of an object.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 08:53:26 +0000 (08:53 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 08:53:26 +0000 (08:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78462

Reviewed by Yury Semikhatsky.

* inspector/front-end/DetailedHeapshotGridNodes.js:
(WebInspector.HeapSnapshotObjectNode.prototype.updateHasChildren):
(WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107542 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js

index 3b22cf9c3b87831a8f5716d5149b0410054a2e0c..7f1e921fdcc28de865d059ccff823808230ad7ce 100644 (file)
@@ -1,3 +1,14 @@
+2012-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: get rid of cycles in containment view of an object.
+        https://bugs.webkit.org/show_bug.cgi?id=78462
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/DetailedHeapshotGridNodes.js:
+        (WebInspector.HeapSnapshotObjectNode.prototype.updateHasChildren):
+        (WebInspector.HeapSnapshotObjectNode.prototype._prefixObjectCell):
+
 2012-02-12  Adam Barth  <abarth@webkit.org>
 
         Remove ENABLE(MEDIA_STREAM) from Navigator.h
index f1b09c019c9ef4656f3f922a1990afb1260fd119..bc838762fcbd7d924f84d8cb2aad7616f1b138eb 100644 (file)
@@ -379,16 +379,14 @@ WebInspector.HeapSnapshotObjectNode = function(tree, isFromBaseSnapshot, edge, p
 WebInspector.HeapSnapshotObjectNode.prototype = {
     updateHasChildren: function(parentGridNode)
     {
-        if (this.showRetainingEdges) {
-            this._parentGridNode = parentGridNode;
-            var ancestor = parentGridNode;
-            while (ancestor) {
-                if (ancestor.snapshotNodeId === this.snapshotNodeId) {
-                    this._cycledWithAncestorGridNode = ancestor;
-                    return;
-                }
-                ancestor = ancestor._parentGridNode;
+        this._parentGridNode = parentGridNode;
+        var ancestor = parentGridNode;
+        while (ancestor) {
+            if (ancestor.snapshotNodeId === this.snapshotNodeId) {
+                this._cycledWithAncestorGridNode = ancestor;
+                return;
             }
+            ancestor = ancestor._parentGridNode;
         }
         WebInspector.HeapSnapshotGenericObjectNode.prototype.updateHasChildren.call(this);
     },
@@ -468,7 +466,7 @@ WebInspector.HeapSnapshotObjectNode.prototype = {
 
     _prefixObjectCell: function(div, data)
     {
-        if (this.showRetainingEdges && this._cycledWithAncestorGridNode)
+        if (this._cycledWithAncestorGridNode)
             div.className += " cycled-ancessor-node";
 
         var nameSpan = document.createElement("span");