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

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

Issue 1857713004: DevTools: simplify the async instrumentation harness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 6051ce7e451a20ebdfd012273e1b894d771cf1f6..7c9fbcd8a2a72e293175bce242215f44c7c75ce1 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.cpp
@@ -119,6 +119,7 @@ void XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent(RawPtr<E
// the previously dispatched event changes the readyState (e.g. when
// the event handler calls xhr.abort()). In such cases a
// readystatechange should have been already dispatched if necessary.
+ InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionContext(), m_target, m_target->isAsync());
m_target->dispatchEvent(event);
}
}
@@ -128,6 +129,7 @@ void XMLHttpRequestProgressEventThrottle::dispatchProgressProgressEvent(RawPtr<E
XMLHttpRequest::State state = m_target->readyState();
if (m_target->readyState() == XMLHttpRequest::LOADING && m_hasDispatchedProgressProgressEvent) {
TRACE_EVENT1("devtools.timeline", "XHRReadyStateChange", "data", InspectorXhrReadyStateChangeEvent::data(m_target->getExecutionContext(), m_target));
+ InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionContext(), m_target, m_target->isAsync());
m_target->dispatchEvent(Event::create(EventTypeNames::readystatechange));
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data());
}
@@ -136,6 +138,7 @@ void XMLHttpRequestProgressEventThrottle::dispatchProgressProgressEvent(RawPtr<E
return;
m_hasDispatchedProgressProgressEvent = true;
+ InspectorInstrumentation::AsyncTask asyncTask(m_target->getExecutionContext(), m_target, m_target->isAsync());
m_target->dispatchEvent(progressEvent);
}

Powered by Google App Engine
This is Rietveld 408576698