Plumbing for handling SW scripts failing to evaluate
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Nov 2017 21:23:52 +0000 (21:23 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Nov 2017 21:23:52 +0000 (21:23 +0000)
commite46c05350818295e67b1209967eec87b58bc2622
tree5759d454c491600fea0b058e53fa82ba18aad566
parentafc0e79b05d410916dd80c9fdac8b4c18c0ff6f3
Plumbing for handling SW scripts failing to evaluate
https://bugs.webkit.org/show_bug.cgi?id=178926

Reviewed by Chris Dumez.

Source/WebCore:

No new tests (Currently no observable behavior change).

In an upcoming patch we'll actually run the appropriate observable steps for when
a ServiceWorker script fails to evaluate.

This is a standalone refactoring + plumbing patch that will make the observable changes
easier to review.

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* bindings/js/WorkerScriptController.h:
(WebCore::WorkerScriptController::workerGlobalScopeWrapper):
(WebCore::WorkerScriptController::vm):
(WebCore::WorkerScriptController::initScriptIfNeeded):

* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):

* workers/WorkerThread.cpp:
(WebCore::WorkerThread::start):
(WebCore::WorkerThread::workerThread):
* workers/WorkerThread.h:

* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::registerServiceWorkerThreadForUpdate):
(WebCore::SWContextManager::registerServiceWorkerThread): Deleted.
* workers/service/context/SWContextManager.h:

* workers/service/context/ServiceWorkerThread.h:
(WebCore::ServiceWorkerThread::serverConnectionIdentifier const):
(WebCore::ServiceWorkerThread::contextData const):

* workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::create):
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::updateWorker):
(WebCore::SWServer::createWorker): Deleted.
* workers/service/server/SWServer.h:

* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::scriptFetchFinished):
(WebCore::SWServerRegistration::scriptContextFailedToStart):

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::updateServiceWorkerContext):
(WebKit::WebSWServerConnection::setContextConnection):
(WebKit::WebSWServerConnection::startServiceWorkerContext): Deleted.
* StorageProcess/ServiceWorker/WebSWServerConnection.h:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::updateServiceWorker):
(WebKit::WebSWContextManagerConnection::serviceWorkerStartedWithMessage):
(WebKit::WebSWContextManagerConnection::startServiceWorker): Deleted.
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/WorkerScriptController.cpp
Source/WebCore/bindings/js/WorkerScriptController.h
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebCore/workers/WorkerThread.cpp
Source/WebCore/workers/WorkerThread.h
Source/WebCore/workers/service/context/SWContextManager.cpp
Source/WebCore/workers/service/context/SWContextManager.h
Source/WebCore/workers/service/context/ServiceWorkerThread.h
Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp
Source/WebCore/workers/service/server/SWServer.cpp
Source/WebCore/workers/service/server/SWServer.h
Source/WebCore/workers/service/server/SWServerRegistration.cpp
Source/WebKit/ChangeLog
Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.cpp
Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.h
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in