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

Unified Diff: Source/core/xml/XMLHttpRequestUpload.h

Issue 307433003: Oilpan: Allocate all EventTarget derived types on the manged heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/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

Powered by Google App Engine
This is Rietveld 408576698