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

Side by Side Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 265793017: Oilpan: move node/element rare data objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + add some asserts for registration Node being present. 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 unified diff | Download patch
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.cpp ('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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // We cannot let ContainerNode destructor call willBeDeletedFromDocument() 77 // We cannot let ContainerNode destructor call willBeDeletedFromDocument()
78 // for this ShadowRoot instance because TreeScope destructor 78 // for this ShadowRoot instance because TreeScope destructor
79 // clears Node::m_treeScope thus ContainerNode is no longer able 79 // clears Node::m_treeScope thus ContainerNode is no longer able
80 // to access it Document reference after that. 80 // to access it Document reference after that.
81 willBeDeletedFromDocument(); 81 willBeDeletedFromDocument();
82 82
83 // We must remove all of our children first before the TreeScope destructor 83 // We must remove all of our children first before the TreeScope destructor
84 // runs so we don't go through TreeScopeAdopter for each child with a 84 // runs so we don't go through TreeScopeAdopter for each child with a
85 // destructed tree scope in each descendant. 85 // destructed tree scope in each descendant.
86 removeDetachedChildren(); 86 removeDetachedChildren();
87 #endif
88 87
89 // We must call clearRareData() here since a ShadowRoot class inherits TreeS cope 88 // We must call clearRareData() here since a ShadowRoot class inherits TreeS cope
90 // as well as Node. See a comment on TreeScope.h for the reason. 89 // as well as Node. See a comment on TreeScope.h for the reason.
91 if (hasRareData()) 90 if (hasRareData())
92 clearRareData(); 91 clearRareData();
92 #endif
93 } 93 }
94 94
95 void ShadowRoot::dispose() 95 void ShadowRoot::dispose()
96 { 96 {
97 #if !ENABLE(OILPAN) 97 #if !ENABLE(OILPAN)
98 removeDetachedChildren(); 98 removeDetachedChildren();
99 #endif 99 #endif
100 } 100 }
101 101
102 ShadowRoot* ShadowRoot::olderShadowRootForBindings() const 102 ShadowRoot* ShadowRoot::olderShadowRootForBindings() const
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 void ShadowRoot::trace(Visitor* visitor) 340 void ShadowRoot::trace(Visitor* visitor)
341 { 341 {
342 visitor->trace(m_prev); 342 visitor->trace(m_prev);
343 visitor->trace(m_next); 343 visitor->trace(m_next);
344 visitor->trace(m_shadowRootRareData); 344 visitor->trace(m_shadowRootRareData);
345 TreeScope::trace(visitor); 345 TreeScope::trace(visitor);
346 DocumentFragment::trace(visitor); 346 DocumentFragment::trace(visitor);
347 } 347 }
348 348
349 } 349 }
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698