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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 296703009: Oilpan: move custom element objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation issue pointed out by clang 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
« no previous file with comments | « Source/core/dom/DocumentInit.cpp ('k') | Source/core/dom/custom/CustomElementCallbackQueue.h » ('j') | 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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 return adoptRefWillBeRefCountedGarbageCollected(new Element(tagName, documen t, CreateElement)); 164 return adoptRefWillBeRefCountedGarbageCollected(new Element(tagName, documen t, CreateElement));
165 } 165 }
166 166
167 Element::~Element() 167 Element::~Element()
168 { 168 {
169 ASSERT(needsAttach()); 169 ASSERT(needsAttach());
170 170
171 #if !ENABLE(OILPAN) 171 #if !ENABLE(OILPAN)
172 if (hasRareData()) 172 if (hasRareData())
173 elementRareData()->clearShadow(); 173 elementRareData()->clearShadow();
174 #endif
175 174
176 if (isCustomElement()) 175 if (isCustomElement())
177 CustomElement::wasDestroyed(this); 176 CustomElement::wasDestroyed(this);
178 177
179 #if !ENABLE(OILPAN)
180 if (hasSyntheticAttrChildNodes()) 178 if (hasSyntheticAttrChildNodes())
181 detachAllAttrNodesFromElement(); 179 detachAllAttrNodesFromElement();
182 180
183 // With Oilpan, either the Element has been removed from the Document 181 // With Oilpan, either the Element has been removed from the Document
184 // or the Document is dead as well. If the Element has been removed from 182 // or the Document is dead as well. If the Element has been removed from
185 // the Document the element has already been removed from the pending 183 // the Document the element has already been removed from the pending
186 // resources. If the document is also dead, there is no need to remove 184 // resources. If the document is also dead, there is no need to remove
187 // the element from the pending resources. 185 // the element from the pending resources.
188 if (hasPendingResources()) { 186 if (hasPendingResources()) {
189 document().accessSVGExtensions().removeElementFromPendingResources(this) ; 187 document().accessSVGExtensions().removeElementFromPendingResources(this) ;
(...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3301 3299
3302 void Element::trace(Visitor* visitor) 3300 void Element::trace(Visitor* visitor)
3303 { 3301 {
3304 if (hasRareData()) 3302 if (hasRareData())
3305 visitor->trace(elementRareData()); 3303 visitor->trace(elementRareData());
3306 3304
3307 ContainerNode::trace(visitor); 3305 ContainerNode::trace(visitor);
3308 } 3306 }
3309 3307
3310 } // namespace WebCore 3308 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentInit.cpp ('k') | Source/core/dom/custom/CustomElementCallbackQueue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698