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

Unified Diff: Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 1200413004: Oilpan: make XHR progress event throttling finalization safe. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move XMLHttpRequestProgressEventThrottle to the heap instead Created 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index d75347048676b26e778a719d20662e096684f8ac..6101b08ca67e94baa691d895d1da4fbbce991c9f 100644
--- a/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -346,7 +346,7 @@ XMLHttpRequest::XMLHttpRequest(ExecutionContext* context, PassRefPtr<SecurityOri
, m_lengthDownloadedToFile(0)
, m_receivedLength(0)
, m_exceptionCode(0)
- , m_progressEventThrottle(this)
+ , m_progressEventThrottle(XMLHttpRequestProgressEventThrottle::create(this))
, m_responseTypeCode(ResponseTypeDefault)
, m_securityOrigin(securityOrigin)
, m_eventDispatchRecursionLevel(0)
@@ -673,7 +673,7 @@ void XMLHttpRequest::dispatchReadyStateChangeEvent()
else
action = XMLHttpRequestProgressEventThrottle::Flush;
}
- m_progressEventThrottle.dispatchReadyStateChangeEvent(Event::create(EventTypeNames::readystatechange), action);
+ m_progressEventThrottle->dispatchReadyStateChangeEvent(Event::create(EventTypeNames::readystatechange), action);
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data());
}
@@ -1222,7 +1222,7 @@ void XMLHttpRequest::dispatchProgressEvent(const AtomicString& type, long long r
unsigned long long loaded = receivedLength >= 0 ? static_cast<unsigned long long>(receivedLength) : 0;
unsigned long long total = lengthComputable ? static_cast<unsigned long long>(expectedLength) : 0;
- m_progressEventThrottle.dispatchProgressEvent(type, lengthComputable, loaded, total);
+ m_progressEventThrottle->dispatchProgressEvent(type, lengthComputable, loaded, total);
if (type == EventTypeNames::loadend)
InspectorInstrumentation::didDispatchXHRLoadendEvent(executionContext(), this);
@@ -1807,12 +1807,12 @@ void XMLHttpRequest::handleDidTimeout()
void XMLHttpRequest::suspend()
{
- m_progressEventThrottle.suspend();
+ m_progressEventThrottle->suspend();
}
void XMLHttpRequest::resume()
{
- m_progressEventThrottle.resume();
+ m_progressEventThrottle->resume();
}
void XMLHttpRequest::stop()
« no previous file with comments | « Source/core/xmlhttprequest/XMLHttpRequest.h ('k') | Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698