Commit a2987e4a authored by ch.dumez@samsung.com's avatar ch.dumez@samsung.com

Un-inline Node's constructor to avoid bloating

Un-inline Node's constructor to avoid bloating. Node's constructor is not
trivial and Node is used in inheritance.

This reduces the release binary size by ~4Kb. I did not see any impact on the
Dromaeo score:
http://dromaeo.com/?id=222265,222267

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/309613006

git-svn-id: svn://svn.chromium.org/blink/trunk@175215 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3bce54b1
...@@ -253,6 +253,26 @@ void Node::trackForDebugging() ...@@ -253,6 +253,26 @@ void Node::trackForDebugging()
#endif #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() Node::~Node()
{ {
#ifndef NDEBUG #ifndef NDEBUG
......
...@@ -752,25 +752,7 @@ protected: ...@@ -752,25 +752,7 @@ protected:
CreateEditingText = CreateText | HasNameOrIsEditingTextFlag, CreateEditingText = CreateText | HasNameOrIsEditingTextFlag,
}; };
Node(TreeScope* treeScope, ConstructionType type) Node(TreeScope*, ConstructionType);
: 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);
}
virtual void didMoveToNewDocument(Document& oldDocument); virtual void didMoveToNewDocument(Document& oldDocument);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment