Web Inspector: migrate dominatorIndex code to the front-end calculated dominatorsTree.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 07:30:20 +0000 (07:30 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 07:30:20 +0000 (07:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=87024

Reviewed by Yury Semikhatsky.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
(WebInspector.HeapSnapshot.prototype._init):

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

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

index 317f3d0..1d54f81 100644 (file)
@@ -1,3 +1,14 @@
+2012-05-21  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: migrate dominatorIndex code to the front-end calculated dominatorsTree.
+        https://bugs.webkit.org/show_bug.cgi?id=87024
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/HeapSnapshot.js:
+        (WebInspector.HeapSnapshotNode.prototype.get dominatorIndex):
+        (WebInspector.HeapSnapshot.prototype._init):
+
 2012-05-22  Kentaro Hara  <haraken@chromium.org>
 
         [V8] Replace 'throwError(); return Undefined();' with 'return throwError()'
index 2f9d451..13d34d1 100644 (file)
@@ -458,7 +458,7 @@ WebInspector.HeapSnapshotNode.prototype = {
 
     get dominatorIndex()
     {
-        return this._nodes[this.nodeIndex + this._snapshot._dominatorOffset];
+        return this._snapshot._dominatorsTree[this.nodeIndex / this._snapshot._nodeFieldCount];
     },
 
     get edges()
@@ -680,7 +680,6 @@ WebInspector.HeapSnapshot.prototype = {
         this._nodeIdOffset = meta.node_fields.indexOf("id");
         this._nodeSelfSizeOffset = meta.node_fields.indexOf("self_size");
         this._nodeRetainedSizeOffset = meta.node_fields.indexOf("retained_size");
-        this._dominatorOffset = meta.node_fields.indexOf("dominator");
         this._firstEdgeIndexOffset = meta.node_fields.indexOf("edges_index");
         this._nodeFieldCount = meta.node_fields.length;