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

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

Issue 2746333002: DevTools: move recurring flag into AsyncTask, control cancelation from embedder only. (Closed)
Patch Set: 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/XMLHttpRequestProgressEventThrottle.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp
index 8bf8019e6349ccd0a2e0481722421c224a3929e0..ffda9d2439ec5abea64b3e6d20ec6dec206cdaed 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp
@@ -132,7 +132,8 @@ void XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent(
// the event handler calls xhr.abort()). In such cases a
// readystatechange should have been already dispatched if necessary.
probe::AsyncTask asyncTask(m_target->getExecutionContext(), m_target,
- m_target->isAsync());
+ "progress");
+ asyncTask.setEnabled(m_target->isAsync());
m_target->dispatchEvent(event);
}
}
@@ -146,7 +147,8 @@ void XMLHttpRequestProgressEventThrottle::dispatchProgressProgressEvent(
InspectorXhrReadyStateChangeEvent::data(
m_target->getExecutionContext(), m_target));
probe::AsyncTask asyncTask(m_target->getExecutionContext(), m_target,
- m_target->isAsync());
+ "progress");
+ asyncTask.setEnabled(m_target->isAsync());
m_target->dispatchEvent(Event::create(EventTypeNames::readystatechange));
}
@@ -155,7 +157,8 @@ void XMLHttpRequestProgressEventThrottle::dispatchProgressProgressEvent(
m_hasDispatchedProgressProgressEvent = true;
probe::AsyncTask asyncTask(m_target->getExecutionContext(), m_target,
- m_target->isAsync());
+ "progress");
+ asyncTask.setEnabled(m_target->isAsync());
m_target->dispatchEvent(progressEvent);
}

Powered by Google App Engine
This is Rietveld 408576698