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

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

Issue 1217803002: Protect readystatechange event dispatch on XMLHttpRequest. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index 6101b08ca67e94baa691d895d1da4fbbce991c9f..45a7de2e9723d073e909c097917a54a1540198fc 100644
--- a/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -664,6 +664,9 @@ void XMLHttpRequest::dispatchReadyStateChangeEvent()
if (!executionContext())
return;
+ // We need this protection because dispatchReadyStateChangeEvent may
+ // dispatch multiple events.
+ ScopedEventDispatchProtect protect(&m_eventDispatchRecursionLevel);
if (m_async || (m_state <= OPENED || m_state == DONE)) {
TRACE_EVENT1("devtools.timeline", "XHRReadyStateChange", "data", InspectorXhrReadyStateChangeEvent::data(executionContext(), this));
XMLHttpRequestProgressEventThrottle::DeferredEventAction action = XMLHttpRequestProgressEventThrottle::Ignore;
« no previous file with comments | « no previous file | Source/core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698