Chromium Code Reviews| Index: Source/core/xml/XMLHttpRequestUpload.h |
| diff --git a/Source/core/xml/XMLHttpRequestUpload.h b/Source/core/xml/XMLHttpRequestUpload.h |
| index b15c01416beffa1ea60a52693ca906a2c798b465..65e17e2bc5fdedf5f3a345d31fd10820aa2fe623 100644 |
| --- a/Source/core/xml/XMLHttpRequestUpload.h |
| +++ b/Source/core/xml/XMLHttpRequestUpload.h |
| @@ -43,15 +43,22 @@ namespace WebCore { |
| class ExecutionContext; |
| class XMLHttpRequest; |
| -class XMLHttpRequestUpload FINAL : public ScriptWrappable, public XMLHttpRequestEventTarget { |
| +class XMLHttpRequestUpload FINAL : public NoBaseWillBeRefCountedGarbageCollected<XMLHttpRequestUpload>, public ScriptWrappable, public XMLHttpRequestEventTarget { |
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequestUpload); |
| public: |
| - static PassOwnPtr<XMLHttpRequestUpload> create(XMLHttpRequest* xmlHttpRequest) |
| + static PassOwnPtrWillBeRawPtr<XMLHttpRequestUpload> create(XMLHttpRequest* xmlHttpRequest) |
| { |
| - return adoptPtr(new XMLHttpRequestUpload(xmlHttpRequest)); |
| + return adoptPtrWillBeRefCountedGarbageCollected(new XMLHttpRequestUpload(xmlHttpRequest)); |
| } |
| +#if ENABLE(OILPAN) |
| + using RefCountedGarbageCollected::ref; |
| + using RefCountedGarbageCollected::deref; |
| +#else |
| void ref() { m_xmlHttpRequest->ref(); } |
| void deref() { m_xmlHttpRequest->deref(); } |
| +#endif |
|
haraken
2014/05/27 01:39:19
Can we avoid writing this by using DEFINE_EVENT_TA
zerny-chromium
2014/05/27 07:34:33
Ditto here.
|
| + |
| XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; } |
| virtual const AtomicString& interfaceName() const OVERRIDE; |
| @@ -62,13 +69,15 @@ public: |
| void handleRequestError(const AtomicString&); |
| + virtual void trace(Visitor*) OVERRIDE; |
| + |
| private: |
| explicit XMLHttpRequestUpload(XMLHttpRequest*); |
| virtual void refEventTarget() OVERRIDE { ref(); } |
| virtual void derefEventTarget() OVERRIDE { deref(); } |
| - XMLHttpRequest* m_xmlHttpRequest; |
| + RawPtrWillBeMember<XMLHttpRequest> m_xmlHttpRequest; |
| EventTargetData m_eventTargetData; |
| // Last progress event values; used when issuing the |