ServiceWorkerFetchDispatcher isn't respecting waitUntil() |
||
Issue descriptionThe expected behavior is that if the SW does something like: e.waitUntil(p); e.respondWith(r); Then the browser starts processing `r` but keeps the SW alive until `p` settles. In C++ this is handled by: r settles => Mojo OnResponse* is called => SWFD runs fetch_callback_. p settles => Mojo response to DispatchFetchEvent is called => SWFD calls version_->FinishRequest(). But it looks like SWFD is calling FinishRequest)() once an OnResponse* is called. So it seems to me SWFD isn't waiting for waitUntil.
,
Jun 12 2018
Hum we have a unit test ServiceWorkerURLRequestJobTest.EarlyResponse which is supposed to test this. Let me check more.
,
Jun 12 2018
I think ServiceWorkerFetchDispatcher::OnFetchEventFinished() is called when p settles.
,
Jun 12 2018
Ahhh I've forgotten we have two request ids: one for the response and one for the event finish. This is WAI. Sorry for the noise! |
||
►
Sign in to add a comment |
||
Comment 1 by falken@chromium.org
, Jun 12 2018Status: Assigned (was: Available)