Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Unified Diff: Source/core/dom/Node.cpp

Issue 309613006: Un-inline Node's constructor to avoid bloating (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Node.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698