Revert "Always use backpressure for fetch"
This reverts commit e0eac774. Reason for revert: this patch breaks DevTools protocol, see crbug.com/807483 Original change's description: > Always use backpressure for fetch > > Previously, backpressure would only be applied to fetch responses if the > Cache-Control: no-store header was set. This was to avoid blocking other > resource loads that might have to wait for the lock on the http disk > cache that was held by the resource load to which backpressure was being > applied. > > As of https://chromium-review.googlesource.com/684615 the disk cache > supports multiple concurrent writers and so this protection is no longer > needed. > > Remove support for the non-backpressure mode and always apply > backpressure. > > The fact that the body is no longer implicitly read is visible > to tests that observe the result of the fetch() via a side > channel, specifically inspector and browser tests. Fix such tests > to explicitly read the body to completion. > > Additionally, in order to satisfy the presubmit check, make > SharedMemoryDataConsumerHandle::Context::on_reader_detached_ a > OnceClosure. > > The implementation already implicitly ran on_reader_detached_ at most > once, because is_on_reader_detached_valid_ would be set to false by > ResetOnReaderDetached immediately after PostTask was called. Now this > has been made explicit by using OnceClosure. > > on_reader_detached_ is only reset on the writer_task_runner_ > thread. When the closure is not run this is implemented by the logic in > ResetOnReaderDetached(), the same as before. When the closure is run the > behaviour has changed slightly: the OnceClosure is moved into the task > that is posted to the writer_task_runner_ thread, where it will be > destroyed automatically after running. There's no nead for a separate > reset in this case. > > BUG=535793 > > Change-Id: I9d2b58e183b84640afc153ac99de08fdc2368240 > Reviewed-on: https://chromium-review.googlesource.com/861695 > Commit-Queue: Adam Rice <ricea@chromium.org> > Reviewed-by: Yutaka Hirano <yhirano@chromium.org> > Cr-Commit-Position: refs/heads/master@{#530070} TBR=ricea@chromium.org,yhirano@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 535793 Change-Id: I79a176496f6fada40ba8f2e4d95848421809ecee Reviewed-on: https://chromium-review.googlesource.com/894683Reviewed-by:Andrey Lushnikov <lushnikov@chromium.org> Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org> Cr-Commit-Position: refs/heads/master@{#533153}
Showing
This diff is collapsed.
Please register or sign in to comment