Chromium Code Reviews| Index: Source/core/dom/DOMImplementation.h |
| diff --git a/Source/core/dom/DOMImplementation.h b/Source/core/dom/DOMImplementation.h |
| index f954c8fd6b9bd489843f83d1a1267b22bec7310a..326f072e29b85f1d6020cd8b163b1028f2b244e9 100644 |
| --- a/Source/core/dom/DOMImplementation.h |
| +++ b/Source/core/dom/DOMImplementation.h |
| @@ -40,14 +40,19 @@ class HTMLDocument; |
| class KURL; |
| class XMLDocument; |
| -class DOMImplementation : public ScriptWrappable { |
| - WTF_MAKE_FAST_ALLOCATED; |
| +class DOMImplementation FINAL : public NoBaseWillBeGarbageCollectedFinalized<DOMImplementation>, public ScriptWrappable { |
| + WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| public: |
| - static PassOwnPtr<DOMImplementation> create(Document& document) { return adoptPtr(new DOMImplementation(document)); } |
| + static PassOwnPtrWillBeRawPtr<DOMImplementation> create(Document& document) |
| + { |
| + return adoptPtrWillBeNoop(new DOMImplementation(document)); |
| + } |
| - void ref() { m_document.ref(); } |
| - void deref() { m_document.deref(); } |
| - Document& document() const { return m_document; } |
| +#if !ENABLE(OILPAN) |
| + void ref() { m_document->ref(); } |
| + void deref() { m_document->deref(); } |
| +#endif |
| + Document& document() const { return *m_document.get(); } |
|
Mads Ager (chromium)
2014/05/08 07:31:11
You can remove the .get() call here. Both RawPtr<T
|
| // DOM methods & attributes for DOMImplementation |
| static bool hasFeature(const String& feature, const String& version); |
| @@ -66,10 +71,12 @@ public: |
| static bool isTextMIMEType(const String&); |
| static bool isJSONMIMEType(const String&); |
| + void trace(Visitor*); |
| + |
| private: |
| explicit DOMImplementation(Document&); |
| - Document& m_document; |
| + RawPtrWillBeMember<Document> m_document; |
| }; |
| } // namespace WebCore |