Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index e9a4172aa4ef341cb4df6eb9872289db5383a129..dba0f250868115b0cb82c3928ee7e5ad0213428b 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -256,6 +256,26 @@ void Node::trackForDebugging() |
#endif |
} |
+Node::Node(TreeScope* treeScope, ConstructionType type) |
+ : m_nodeFlags(type) |
+ , m_parentOrShadowHostNode(nullptr) |
+ , m_treeScope(treeScope) |
+ , m_previous(nullptr) |
+ , m_next(nullptr) |
+{ |
+ ASSERT(m_treeScope || type == CreateDocument || type == CreateShadowRoot); |
+ ScriptWrappable::init(this); |
+#if !ENABLE(OILPAN) |
+ if (m_treeScope) |
+ m_treeScope->guardRef(); |
+#endif |
+ |
+#if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS) |
+ trackForDebugging(); |
+#endif |
+ InspectorCounters::incrementCounter(InspectorCounters::NodeCounter); |
+} |
+ |
Node::~Node() |
{ |
#ifndef NDEBUG |