Commit 74fca1c3 authored by Tsuyoshi Horo's avatar Tsuyoshi Horo Committed by Commit Bot

Stop resetting 10 sec timeout in FetchParameters::MakeSynchronous()

Before https://crrev.com/c/657787, FetchParameters::MakeSynchronous() always
calls SetTimeoutInterval(10). So I thought that 10 second is the default timeout
for all synchronous resouce loading.

But this was wrong. The TimeoutInterval of ResourceRequest was not used. After
the CL the value is used for the timeout in SyncLoadContext. But the default
timeout of sync XMLHttpRequest must be infinite. This caused the bug 844268.

To fix this bug, this CL stops resetting 10 sec timeout in MakeSynchronous().

Bug: 844268
Change-Id: I7295ec78637548dc810bb3a8a12a54db4cfbc368
Reviewed-on: https://chromium-review.googlesource.com/1068893Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561374}
parent 8cc2e7e2
...@@ -118,9 +118,6 @@ void FetchParameters::MakeSynchronous() { ...@@ -118,9 +118,6 @@ void FetchParameters::MakeSynchronous() {
// Synchronous requests should always be max priority, lest they hang the // Synchronous requests should always be max priority, lest they hang the
// renderer. // renderer.
resource_request_.SetPriority(ResourceLoadPriority::kHighest); resource_request_.SetPriority(ResourceLoadPriority::kHighest);
if (resource_request_.TimeoutInterval() == INT_MAX) {
resource_request_.SetTimeoutInterval(10);
}
// Skip ServiceWorker for synchronous loads from the main thread to avoid // Skip ServiceWorker for synchronous loads from the main thread to avoid
// deadlocks. // deadlocks.
if (IsMainThread()) if (IsMainThread())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment