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

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 + assert for Nodes having no renderer on destruction. 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
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 willBeDeletedFromDocument(); 83 willBeDeletedFromDocument();
84 #endif 84 #endif
85 85
86 // We must remove all of our children first before the TreeScope destructor 86 // We must remove all of our children first before the TreeScope destructor
87 // runs so we don't go through TreeScopeAdopter for each child with a 87 // runs so we don't go through TreeScopeAdopter for each child with a
88 // destructed tree scope in each descendant. 88 // destructed tree scope in each descendant.
89 removeDetachedChildren(); 89 removeDetachedChildren();
90 90
91 // We must call clearRareData() here since a ShadowRoot class inherits TreeS cope 91 // We must call clearRareData() here since a ShadowRoot class inherits TreeS cope
92 // as well as Node. See a comment on TreeScope.h for the reason. 92 // as well as Node. See a comment on TreeScope.h for the reason.
93 #if !ENABLE(OILPAN)
93 if (hasRareData()) 94 if (hasRareData())
94 clearRareData(); 95 clearRareData();
96 #endif
95 } 97 }
96 98
97 void ShadowRoot::dispose() 99 void ShadowRoot::dispose()
98 { 100 {
99 removeDetachedChildren(); 101 removeDetachedChildren();
100 } 102 }
101 103
102 ShadowRoot* ShadowRoot::olderShadowRootForBindings() const 104 ShadowRoot* ShadowRoot::olderShadowRootForBindings() const
103 { 105 {
104 ShadowRoot* older = olderShadowRoot(); 106 ShadowRoot* older = olderShadowRoot();
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 340 }
339 341
340 void ShadowRoot::trace(Visitor* visitor) 342 void ShadowRoot::trace(Visitor* visitor)
341 { 343 {
342 visitor->trace(m_shadowRootRareData); 344 visitor->trace(m_shadowRootRareData);
343 TreeScope::trace(visitor); 345 TreeScope::trace(visitor);
344 DocumentFragment::trace(visitor); 346 DocumentFragment::trace(visitor);
345 } 347 }
346 348
347 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698