Web Inspector: get rid of artificial heap snapshot nodes from the retaining tree.
[WebKit-https.git] / Source / WebCore / inspector / front-end / HeapSnapshot.js
index 5e243aa14e29852982839fea25fbe1267dec5b5e..4a57ad7e61c794995a7cef0ba8b69847d8e8ce05 100644 (file)
@@ -566,6 +566,11 @@ WebInspector.HeapSnapshotNode.prototype = {
         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 @@ WebInspector.HeapSnapshot.prototype = {
         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");