This is mostly implemented, the last thing is to get request bodies to work for network fallback requests. Right now passing the content::ResourceRequestBody over Mojo/IPC moves the data pipe getter elements out, so after the callsites to DispatchFetchEvent in ServiceWorkeFetchDispatcher and ServiceWorkerSubresourceLoader the body cannot be reused. This is bad because we need to use the body again if the service worker did not provide a response, and we fall back to network.
My idea is to make a copy of the ResourceRequestBody or at least just copy the DataPipeGetter elements inside of it in order to reconstruct the body. We already have a network::mojom::DataPipeGetter::Clone() method.
Comment 1 by bugdroid1@chromium.org
, Nov 2 2017