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

Side by Side 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, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Node.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 { 249 {
250 #ifndef NDEBUG 250 #ifndef NDEBUG
251 nodeCounter.increment(); 251 nodeCounter.increment();
252 #endif 252 #endif
253 253
254 #if DUMP_NODE_STATISTICS 254 #if DUMP_NODE_STATISTICS
255 liveNodeSet.add(this); 255 liveNodeSet.add(this);
256 #endif 256 #endif
257 } 257 }
258 258
259 Node::Node(TreeScope* treeScope, ConstructionType type)
260 : m_nodeFlags(type)
261 , m_parentOrShadowHostNode(nullptr)
262 , m_treeScope(treeScope)
263 , m_previous(nullptr)
264 , m_next(nullptr)
265 {
266 ASSERT(m_treeScope || type == CreateDocument || type == CreateShadowRoot);
267 ScriptWrappable::init(this);
268 #if !ENABLE(OILPAN)
269 if (m_treeScope)
270 m_treeScope->guardRef();
271 #endif
272
273 #if !defined(NDEBUG) || (defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS)
274 trackForDebugging();
275 #endif
276 InspectorCounters::incrementCounter(InspectorCounters::NodeCounter);
277 }
278
259 Node::~Node() 279 Node::~Node()
260 { 280 {
261 #ifndef NDEBUG 281 #ifndef NDEBUG
262 nodeCounter.decrement(); 282 nodeCounter.decrement();
263 #endif 283 #endif
264 284
265 #if DUMP_NODE_STATISTICS 285 #if DUMP_NODE_STATISTICS
266 liveNodeSet.remove(this); 286 liveNodeSet.remove(this);
267 #endif 287 #endif
268 288
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2578 node->showTreeForThis(); 2598 node->showTreeForThis();
2579 } 2599 }
2580 2600
2581 void showNodePath(const WebCore::Node* node) 2601 void showNodePath(const WebCore::Node* node)
2582 { 2602 {
2583 if (node) 2603 if (node)
2584 node->showNodePathForThis(); 2604 node->showNodePathForThis();
2585 } 2605 }
2586 2606
2587 #endif 2607 #endif
OLDNEW
« 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