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

Unified Diff: Source/core/dom/TemplateContentDocumentFragment.h

Issue 289273002: Oilpan: make DocumentFragment a heap allocated object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tweaks to avoid conflicts with ongoing ShadowRoot CLs 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/TemplateContentDocumentFragment.h
diff --git a/Source/core/dom/TemplateContentDocumentFragment.h b/Source/core/dom/TemplateContentDocumentFragment.h
index 380e8fa48b25250083dfe50185627aaeba1a4b20..22d52f2a83b8a388bfa589b26761501941823cc1 100644
--- a/Source/core/dom/TemplateContentDocumentFragment.h
+++ b/Source/core/dom/TemplateContentDocumentFragment.h
@@ -33,13 +33,21 @@ namespace WebCore {
class TemplateContentDocumentFragment FINAL : public DocumentFragment {
public:
- static PassRefPtr<TemplateContentDocumentFragment> create(Document& document, Element* host)
+ static PassRefPtrWillBeRawPtr<TemplateContentDocumentFragment> create(Document& document, Element* host)
{
- return adoptRef(new TemplateContentDocumentFragment(document, host));
+ return adoptRefWillBeRefCountedGarbageCollected(new TemplateContentDocumentFragment(document, host));
}
Element* host() const { return m_host; }
- void clearHost() { m_host = 0; }
+#if !ENABLE(OILPAN)
+ void clearHost() { m_host = nullptr; }
+#endif
+
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_host);
+ DocumentFragment::trace(visitor);
+ }
private:
TemplateContentDocumentFragment(Document& document, Element* host)
@@ -50,7 +58,7 @@ private:
virtual bool isTemplateContent() const OVERRIDE { return true; }
- Element* m_host;
+ RawPtrWillBeMember<Element> m_host;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698