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

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

Issue 79953004: Improve fidelity of XHR progress events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make test stable Created 7 years, 1 month 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/XMLHttpRequestProgressEventThrottle.h ('k') | Source/core/xml/XMLHttpRequestUpload.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequestProgressEventThrottle.cpp
diff --git a/Source/core/xml/XMLHttpRequestProgressEventThrottle.cpp b/Source/core/xml/XMLHttpRequestProgressEventThrottle.cpp
index 05e8179418323b53da9206d25330766e156f858d..9a3c16c074494eac5b80e006e63d075eb1c0af61 100644
--- a/Source/core/xml/XMLHttpRequestProgressEventThrottle.cpp
+++ b/Source/core/xml/XMLHttpRequestProgressEventThrottle.cpp
@@ -98,12 +98,12 @@ void XMLHttpRequestProgressEventThrottle::dispatchEvent(PassRefPtr<Event> event)
m_target->dispatchEvent(event);
}
-void XMLHttpRequestProgressEventThrottle::dispatchEventAndLoadEnd(PassRefPtr<Event> event)
+void XMLHttpRequestProgressEventThrottle::dispatchEventAndLoadEnd(const AtomicString& type, bool lengthComputable, unsigned long long bytesSent, unsigned long long total)
{
- ASSERT(event->type() == EventTypeNames::load || event->type() == EventTypeNames::abort || event->type() == EventTypeNames::error || event->type() == EventTypeNames::timeout);
+ ASSERT(type == EventTypeNames::load || type == EventTypeNames::abort || type == EventTypeNames::error || type == EventTypeNames::timeout);
- dispatchEvent(event);
- dispatchEvent(XMLHttpRequestProgressEvent::create(EventTypeNames::loadend));
+ dispatchEvent(XMLHttpRequestProgressEvent::create(type, lengthComputable, bytesSent, total));
+ dispatchEvent(XMLHttpRequestProgressEvent::create(EventTypeNames::loadend, lengthComputable, bytesSent, total));
}
bool XMLHttpRequestProgressEventThrottle::flushDeferredProgressEvent()
« no previous file with comments | « Source/core/xml/XMLHttpRequestProgressEventThrottle.h ('k') | Source/core/xml/XMLHttpRequestUpload.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698