Commit 690f5cab authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Request with keepalive set should not be throttlable

Otherwise, the throttled request will just be discarded when the frame
is detached.

Bug: 988102
Change-Id: I1104d7eed6e563cdfdf37b1af6a1205b4adb852c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724526
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: default avatarTakashi Toyoshima <toyoshim@chromium.org>
Auto-Submit: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682245}
parent a37945e5
......@@ -435,12 +435,14 @@ void ResourceLoader::Start() {
// Synchronous requests should not work with throttling or stopping. Also,
// disables throttling for the case that can be used for aka long-polling
// requests, but allows stopping for long-polling requests.
// requests, but allows stopping for long-polling requests. We don't want
// to throttle a request with keepalive set because such a request is
// expected to work even when a frame is freezed/detached.
// Top level frame main resource loads are also not throttleable or
// stoppable. We also disable throttling and stopping for non-http[s]
// requests.
if (resource_->Options().synchronous_policy == kRequestSynchronously ||
!request.Url().ProtocolIsInHTTPFamily()) {
request.GetKeepalive() || !request.Url().ProtocolIsInHTTPFamily()) {
throttle_option =
ResourceLoadScheduler::ThrottleOption::kCanNotBeStoppedOrThrottled;
} else if (!IsThrottlableRequestContext(request.GetRequestContext())) {
......
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