commit | 3bcb109517d02baab9050e4b2a1a3ce148c035df | [log] [tgz] |
---|---|---|
author | Dominic Farolino <dom@chromium.org> | Thu Jul 11 14:01:15 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jul 11 14:01:15 2019 |
tree | b200bd1b6289ee0439cb47aab7e16d7856336005 | |
parent | 7bf97743b1bb331f0bd8bddf77d254b21a0a7df2 [diff] |
Stop re-setting ResourceRequest's priority if it is already set This CL addresses the concerns in https://crbug.com/882344, and is somewhat a follow-up to https://crbug.com/872776. This CL ensures that ResourceRequests with a pre-set priority do not get their priority re-computed by ResourceFetcher. Before this CL, ResourceRequests passing through ResourceFetcher always have their priority computed. When a Service Worker fetches a resource from the network, it does so using the fetch() API, whose requests get the computed priority kHigh. Therefore, all requests passing through Service Worker whose priority is < kHigh would unnecessarily get upgraded to kHigh. This is the inverse of the problem described in https://crbug.com/872776. After this CL, we stop invoking ResourceFetcher::ComputeLoadPriority if a ResourceRequest already has its priority set. This ensures that originally-computed priorities are completely preserved when passing through a Service Worker. What this CL does not change is the fact that requests that already have their priorities set are exempt from priority experiments, but if that is to be done, it should be done separately. An added benefit is that we remove some funny logic from ComputeLoadPriority that ensures a request is never down-prioritized. Chromestatus: https://chromestatus.com/feature/5642182885113856 R=kinuko@chromium.org, yhirano@chromium.org, yoavweiss@chromium.org Bug: 882344 Change-Id: Ic2516f3338f1ad1f4caa77b76dbcecb3dcaf84a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1683494 Commit-Queue: Dominic Farolino <dom@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#676409}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .