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

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

Issue 2746333002: DevTools: move recurring flag into AsyncTask, control cancelation from embedder only. (Closed)
Patch Set: using _END now Created 3 years, 9 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: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index bc4fc688745824e5f2b8d091560593caebdd6b01..7a5f9b99a06a171c05111cc71014bc36bbc58442 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -958,8 +958,7 @@ void XMLHttpRequest::createRequest(PassRefPtr<EncodedFormData> httpBody,
// Also, only async requests support upload progress events.
bool uploadEvents = false;
if (m_async) {
- probe::asyncTaskScheduled(&executionContext, "XMLHttpRequest.send", this,
- true);
+ probe::asyncTaskScheduled(&executionContext, "XMLHttpRequest.send", this);
dispatchProgressEvent(EventTypeNames::loadstart, 0, 0);
// Event handler could have invalidated this send operation,
// (re)setting the send flag and/or initiating another send
@@ -1216,11 +1215,11 @@ void XMLHttpRequest::dispatchProgressEvent(const AtomicString& type,
lengthComputable ? static_cast<unsigned long long>(expectedLength) : 0;
ExecutionContext* context = getExecutionContext();
- probe::AsyncTask asyncTask(context, this, m_async);
+ probe::AsyncTask asyncTask(
+ context, this, type == EventTypeNames::loadend ? nullptr : "progress",
+ m_async);
m_progressEventThrottle->dispatchProgressEvent(type, lengthComputable, loaded,
total);
- if (m_async && type == EventTypeNames::loadend)
- probe::asyncTaskCanceled(context, this);
}
void XMLHttpRequest::dispatchProgressEventFromSnapshot(

Powered by Google App Engine
This is Rietveld 408576698