Fetch: Delay buffering Response data.
When a service worker executes code like `evt.respondWith(fetch(r))` we should be able to directly pass the fetch's resulting mojo::DataPipe through without any data copying. This previously did not work, however, since the BufferingBytesConsumer would immediately start buffering the Response body data. This CL fixes this issue by delaying the start of the buffering by a short amount of time. This gives the service worker time to drain the pipe. The delay is currently disabled by default behind the "BufferingBytesConsumerDelay" feature. Based on yhirano's draft CL at crrev.com/c/1383755. Bug: 911036 Change-Id: I65675ce62a7ce593c8994b3e1258634840ba6c2d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1679669 Commit-Queue: Ben Kelly <wanderview@chromium.org> Reviewed-by:Yutaka Hirano <yhirano@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Robert Kaplow <rkaplow@chromium.org> Cr-Commit-Position: refs/heads/master@{#676053}
Showing
This diff is collapsed.
Please register or sign in to comment