Get rid of ServiceWorker::allWorkers() hashmap
https://bugs.webkit.org/show_bug.cgi?id=180111
Reviewed by Brady Eidson.
Get rid of ServiceWorker::allWorkers() hashmap as it is not thread safe and we'll soon have
ServiceWorker objects living in various service worker threads.
Instead, we now have a per-ScriptExecutionContext map, which is inherently thread-safe.
No new tests, no web-facing behavior change.
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::registerServiceWorker):
(WebCore::ScriptExecutionContext::unregisterServiceWorker):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::serviceWorker):
* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::getOrCreate):
(WebCore::ServiceWorker::ServiceWorker):
(WebCore::ServiceWorker::~ServiceWorker):
(WebCore::ServiceWorker::stop):
* workers/service/ServiceWorker.h:
* workers/service/server/SWClientConnection.cpp:
(WebCore::SWClientConnection::updateWorkerState):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225248
268f45cc-cd09-0410-ab3c-
d52691b4dbfc