Handle Fetch should wait for the service worker's state to become activated when it is currently activating. Specification: - https://w3c.github.io/ServiceWorker/#on-fetch-request-algorithm (Step 16)
Created attachment 329715 [details] Patch
Created attachment 329732 [details] Patch
Comment on attachment 329732 [details] Patch So we keep the pending fetch in storage process until service worker is active. Another option would be to send the fetch to the service worker process and wait there, but this is probably less safe?
Comment on attachment 329732 [details] Patch Rejecting attachment 329732 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 329732, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: 8. 1 out of 1 hunk FAILED -- saving rejects to file Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp.rej patching file LayoutTests/imported/w3c/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https-expected.txt Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Youenn Fablet']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.webkit.org/results/5754744
(In reply to youenn fablet from comment #3) > Comment on attachment 329732 [details] > Patch > > So we keep the pending fetch in storage process until service worker is > active. > Another option would be to send the fetch to the service worker process and > wait there, but this is probably less safe? The spec says to first wait for activated and then call runServiceWorker, which is why I put the check there.
Created attachment 329777 [details] Patch
Created attachment 329781 [details] Patch
Created attachment 329789 [details] Patch
Comment on attachment 329789 [details] Patch Clearing flags on attachment: 329789 Committed r226136: <https://trac.webkit.org/changeset/226136>
All reviewed patches have been landed. Closing bug.
<rdar://problem/36139197>