| Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp
|
| diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp
|
| index 07cd81789715933efa73ec2a98f90d500280bd1d..42456f2abc09259bbd8a06a79a53d70d51f5bfeb 100644
|
| --- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp
|
| +++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestUpload.cpp
|
| @@ -27,6 +27,7 @@
|
|
|
| #include "core/EventTypeNames.h"
|
| #include "core/events/ProgressEvent.h"
|
| +#include "core/inspector/InspectorInstrumentation.h"
|
| #include "wtf/Assertions.h"
|
| #include "wtf/text/AtomicString.h"
|
|
|
| @@ -53,12 +54,14 @@ void XMLHttpRequestUpload::dispatchProgressEvent(unsigned long long bytesSent, u
|
| {
|
| m_lastBytesSent = bytesSent;
|
| m_lastTotalBytesToBeSent = totalBytesToBeSent;
|
| + InspectorInstrumentation::AsyncTask asyncTask(getExecutionContext(), m_xmlHttpRequest, m_xmlHttpRequest->isAsync());
|
| dispatchEvent(ProgressEvent::create(EventTypeNames::progress, true, bytesSent, totalBytesToBeSent));
|
| }
|
|
|
| void XMLHttpRequestUpload::dispatchEventAndLoadEnd(const AtomicString& type, bool lengthComputable, unsigned long long bytesSent, unsigned long long total)
|
| {
|
| ASSERT(type == EventTypeNames::load || type == EventTypeNames::abort || type == EventTypeNames::error || type == EventTypeNames::timeout);
|
| + InspectorInstrumentation::AsyncTask asyncTask(getExecutionContext(), m_xmlHttpRequest, m_xmlHttpRequest->isAsync());
|
| dispatchEvent(ProgressEvent::create(type, lengthComputable, bytesSent, total));
|
| dispatchEvent(ProgressEvent::create(EventTypeNames::loadend, lengthComputable, bytesSent, total));
|
| }
|
| @@ -66,6 +69,7 @@ void XMLHttpRequestUpload::dispatchEventAndLoadEnd(const AtomicString& type, boo
|
| void XMLHttpRequestUpload::handleRequestError(const AtomicString& type)
|
| {
|
| bool lengthComputable = m_lastTotalBytesToBeSent > 0 && m_lastBytesSent <= m_lastTotalBytesToBeSent;
|
| + InspectorInstrumentation::AsyncTask asyncTask(getExecutionContext(), m_xmlHttpRequest, m_xmlHttpRequest->isAsync());
|
| dispatchEvent(ProgressEvent::create(EventTypeNames::progress, lengthComputable, m_lastBytesSent, m_lastTotalBytesToBeSent));
|
| dispatchEventAndLoadEnd(type, lengthComputable, m_lastBytesSent, m_lastTotalBytesToBeSent);
|
| }
|
|
|