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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 2755483006: Stop having separate timeout timers for the preflight and the actual request (Closed)
Patch Set: fix 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-allow-with-delay.php ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
index 06461184f09056f3630b69d28fcb45b8cdcdf9ec..b2a432eb82f236c5358b709675ec1fdeb99d7d46 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
@@ -900,9 +900,6 @@ void DocumentThreadableLoader::handleSuccessfulFinish(unsigned long identifier,
DCHECK(m_fallbackRequestForServiceWorker.isNull());
if (!m_actualRequest.isNull()) {
- // FIXME: Timeout should be applied to whole fetch, not for each of
- // preflight and actual request.
- m_timeoutTimer.stop();
DCHECK(!m_sameOriginRequest);
DCHECK_EQ(m_options.crossOriginRequestPolicy, UseAccessControl);
loadActualRequest();
@@ -988,7 +985,9 @@ void DocumentThreadableLoader::loadRequestAsync(
if (!m_actualRequest.isNull())
resourceLoaderOptions.dataBufferingPolicy = BufferData;
- if (m_options.timeoutMilliseconds > 0) {
+ // The timer can be active if this is the actual request of a
+ // CORS-with-preflight request.
+ if (m_options.timeoutMilliseconds > 0 && !m_timeoutTimer.isActive()) {
m_timeoutTimer.startOneShot(m_options.timeoutMilliseconds / 1000.0,
BLINK_FROM_HERE);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/resources/access-control-allow-with-delay.php ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698