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

Side by Side Diff: Source/core/xml/XMLHttpRequestUpload.h

Issue 316443004: Oilpan: Remove ref counting from EventTarget and all uses of Pass/RefPtr<EventTarget>. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: dbl trace Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 class XMLHttpRequestUpload FINAL : public NoBaseWillBeRefCountedGarbageCollected <XMLHttpRequestUpload>, public ScriptWrappable, public XMLHttpRequestEventTarget { 46 class XMLHttpRequestUpload FINAL : public NoBaseWillBeRefCountedGarbageCollected <XMLHttpRequestUpload>, public ScriptWrappable, public XMLHttpRequestEventTarget {
47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequestUpload); 47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequestUpload);
48 public: 48 public:
49 static PassOwnPtrWillBeRawPtr<XMLHttpRequestUpload> create(XMLHttpRequest* x mlHttpRequest) 49 static PassOwnPtrWillBeRawPtr<XMLHttpRequestUpload> create(XMLHttpRequest* x mlHttpRequest)
50 { 50 {
51 return adoptPtrWillBeRefCountedGarbageCollected(new XMLHttpRequestUpload (xmlHttpRequest)); 51 return adoptPtrWillBeRefCountedGarbageCollected(new XMLHttpRequestUpload (xmlHttpRequest));
52 } 52 }
53 53
54 #if ENABLE(OILPAN) 54 #if ENABLE(OILPAN)
55 using RefCountedGarbageCollected::ref; 55 using RefCountedGarbageCollected::ref;
sof 2014/06/03 10:13:44 Still needed?
zerny-chromium 2014/06/03 11:01:02 Nicely spotted. These can be removed now that we o
56 using RefCountedGarbageCollected::deref; 56 using RefCountedGarbageCollected::deref;
57 #else 57 #else
58 void ref() { m_xmlHttpRequest->ref(); } 58 void ref() { m_xmlHttpRequest->ref(); }
59 void deref() { m_xmlHttpRequest->deref(); } 59 void deref() { m_xmlHttpRequest->deref(); }
60 #endif 60 #endif
61 61
62 XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; } 62 XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; }
63 63
64 virtual const AtomicString& interfaceName() const OVERRIDE; 64 virtual const AtomicString& interfaceName() const OVERRIDE;
65 virtual ExecutionContext* executionContext() const OVERRIDE; 65 virtual ExecutionContext* executionContext() const OVERRIDE;
66 66
67 void dispatchEventAndLoadEnd(const AtomicString&, bool, unsigned long long, unsigned long long); 67 void dispatchEventAndLoadEnd(const AtomicString&, bool, unsigned long long, unsigned long long);
68 void dispatchProgressEvent(unsigned long long, unsigned long long); 68 void dispatchProgressEvent(unsigned long long, unsigned long long);
69 69
70 void handleRequestError(const AtomicString&); 70 void handleRequestError(const AtomicString&);
71 71
72 virtual void trace(Visitor*) OVERRIDE; 72 virtual void trace(Visitor*) OVERRIDE;
73 73
74 private: 74 private:
75 explicit XMLHttpRequestUpload(XMLHttpRequest*); 75 explicit XMLHttpRequestUpload(XMLHttpRequest*);
76 76
77 #if !ENABLE(OILPAN)
77 virtual void refEventTarget() OVERRIDE { ref(); } 78 virtual void refEventTarget() OVERRIDE { ref(); }
78 virtual void derefEventTarget() OVERRIDE { deref(); } 79 virtual void derefEventTarget() OVERRIDE { deref(); }
80 #endif
79 81
80 RawPtrWillBeMember<XMLHttpRequest> m_xmlHttpRequest; 82 RawPtrWillBeMember<XMLHttpRequest> m_xmlHttpRequest;
81 EventTargetData m_eventTargetData; 83 EventTargetData m_eventTargetData;
82 84
83 // Last progress event values; used when issuing the 85 // Last progress event values; used when issuing the
84 // required 'progress' event on a request error or abort. 86 // required 'progress' event on a request error or abort.
85 unsigned long long m_lastBytesSent; 87 unsigned long long m_lastBytesSent;
86 unsigned long long m_lastTotalBytesToBeSent; 88 unsigned long long m_lastTotalBytesToBeSent;
87 }; 89 };
88 90
89 } // namespace WebCore 91 } // namespace WebCore
90 92
91 #endif // XMLHttpRequestUpload_h 93 #endif // XMLHttpRequestUpload_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698