A service worker instance should be terminated when its SWServer is destroyed
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2019 23:33:38 +0000 (23:33 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2019 23:33:38 +0000 (23:33 +0000)
commite9047904432e79475272de9456f70fa5a434bebb
tree08a754a11022337e20974bcfdf676fed2e18d832
parent6d4fa13d0dd0fadeaf3a80805c90d050f79814fb
A service worker instance should be terminated when its SWServer is destroyed
https://bugs.webkit.org/show_bug.cgi?id=197801
<rdar://problem/50587270>

Reviewed by Chris Dumez.

Source/WebCore:

On session destruction, the SWServer is destroyed.
At that time, it should terminate all its running service workers.
Covered by updated API test.

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::~SWServer):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/workers/service/server/SWServer.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm