Handle Fetch should wait for the service worker's state to become activated
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2017 21:22:22 +0000 (21:22 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Dec 2017 21:22:22 +0000 (21:22 +0000)
commiteb21fcffeaefedc482e715ed6c69f5429938e4ea
tree80c9324c8c2d7c1d1d69f536342158ae2078ab36
parent6a5807b88026cb9547d7b6d1775427e613013c8a
Handle Fetch should wait for the service worker's state to become activated
https://bugs.webkit.org/show_bug.cgi?id=180959

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline WPT test that is now passing.

* web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https-expected.txt:

Source/WebCore:

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)

No new tests, rebaselined existing test.

* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::~SWServerWorker):
(WebCore::SWServerWorker::whenActivated):
(WebCore::SWServerWorker::setState):
(WebCore::SWServerWorker::callWhenActivatedHandler):
* workers/service/server/SWServerWorker.h:

Source/WebKit:

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)

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::startFetch):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-waits-for-activate.https-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/workers/service/server/SWServer.h
Source/WebCore/workers/service/server/SWServerWorker.cpp
Source/WebCore/workers/service/server/SWServerWorker.h
Source/WebKit/ChangeLog
Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp