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..a4765d2bc6f5ad744e2c39e2667618e667d7d7e8 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) |
|
tkent
2014/05/07 23:43:20
Why do you change the argument type from a referen
sof
2014/05/08 05:24:13
At the single call site, converting a pointer into
tkent
2014/05/08 06:09:16
Even in such case, the reference still has benefit
sof
2014/05/08 06:14:53
I'll switch back, but the lack of reviewing consis
|
| + { |
| + 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(); } |
| // 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&); |
| + explicit DOMImplementation(Document*); |
| - Document& m_document; |
| + RawPtrWillBeMember<Document> m_document; |
| }; |
| } // namespace WebCore |