S13nServiceWorker: postpone fetch events for subresources when idle
This patch implements a part of idle timer's logic. Fetch events coming through mojom::ControllerServiceWorker after the worker has requested termination to the browser should be queued until the worker receives the next event or StopWorker message from the browser. If the worker receives the next event from the browser, the queued events should run before the event from the browser, otherwise the order of the events would be messed up. If the worker receives StopWorker message instead, the worker shouldn't invoke the callback for the fetch event, and silently should disconnect the pipe to the clients. Bug: 774374 Change-Id: I6f3c90405ff037fe07df0310e2234cb81cb2ead9 Reviewed-on: https://chromium-review.googlesource.com/816458 Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Reviewed-by:Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#523677}
Showing
Please register or sign in to comment