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

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

Issue 27571005: Replace Timers used in ActiveDOMObject with AsyncMethodRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/core/xml/XMLHttpRequest.h ('k') | Source/modules/mediasource/SourceBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index b617822625ee0befaec05fcc7f4728782122deab..5b8ff2000c4a3d67ff675e6e624a89d9f49ee020 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -182,7 +182,7 @@ XMLHttpRequest::XMLHttpRequest(ExecutionContext* context, PassRefPtr<SecurityOri
, m_exceptionCode(0)
, m_progressEventThrottle(this)
, m_responseTypeCode(ResponseTypeDefault)
- , m_protectionTimer(this, &XMLHttpRequest::dropProtection)
+ , m_dropProtectionRunner(this, &XMLHttpRequest::dropProtection)
, m_securityOrigin(securityOrigin)
{
initializeXMLHttpRequestStaticData();
@@ -1004,12 +1004,10 @@ void XMLHttpRequest::handleDidCancel()
void XMLHttpRequest::dropProtectionSoon()
{
- if (m_protectionTimer.isActive())
- return;
- m_protectionTimer.startOneShot(0);
+ m_dropProtectionRunner.runAsync();
}
-void XMLHttpRequest::dropProtection(Timer<XMLHttpRequest>*)
+void XMLHttpRequest::dropProtection()
{
unsetPendingActivity(this);
}
« no previous file with comments | « Source/core/xml/XMLHttpRequest.h ('k') | Source/modules/mediasource/SourceBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698