SW "Hello world".
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Oct 2017 06:44:47 +0000 (06:44 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Oct 2017 06:44:47 +0000 (06:44 +0000)
commit542b39d3cc975ad0ba212cd3d3f0a3e6f228365e
treeba7c0aceaa7a2aaad8bd1c2e37eea1c487130741
parent5f0d4de20353636586cd4c4040d5890f65307486
SW "Hello world".
https://bugs.webkit.org/show_bug.cgi?id=178187

Reviewed by Andy Estes.

Source/WebCore:

No new tests (Covered by changes to existing tests).

With this patch, SW scripts are actually compiled and run inside a ServiceWorkerGlobalScope environment
in the SW context process.

* WebCore.xcodeproj/project.pbxproj:

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::initScript):

* dom/EventTargetFactory.in:

* workers/WorkerGlobalScope.h:
(WebCore::WorkerGlobalScope::isServiceWorkerGlobalScope const):

* workers/service/ServiceWorkerContextData.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp.
(WebCore::ServiceWorkerContextData::isolatedCopy const):
* workers/service/ServiceWorkerContextData.h:
(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):

* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
(WebCore::ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope):
(WebCore::ServiceWorkerGlobalScope::registration):
(WebCore::ServiceWorkerGlobalScope::eventTargetInterface const):
* workers/service/ServiceWorkerGlobalScope.h:
(WebCore::ServiceWorkerGlobalScope::create):
(WebCore::ServiceWorkerGlobalScope::serverConnectionIdentifier const):

* workers/service/context/SWContextManager.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp.
(WebCore::SWContextManager::singleton):
(WebCore::SWContextManager::SWContextManager):
(WebCore::SWContextManager::startServiceWorkerContext):
* workers/service/context/SWContextManager.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h.

* workers/service/context/ServiceWorkerThread.cpp: Added.
(WebCore::ServiceWorkerThreadProxy::sharedDummyProxy):
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
(WebCore::m_workerObjectProxy):
(WebCore::ServiceWorkerThread::~ServiceWorkerThread):
(WebCore::ServiceWorkerThread::createWorkerGlobalScope):
(WebCore::ServiceWorkerThread::runEventLoop):
* workers/service/context/ServiceWorkerThread.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h.
(WebCore::ServiceWorkerThread::create):
(WebCore::ServiceWorkerThread::workerObjectProxy const):

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

Source/WebKit:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::startServiceWorkerContext):

LayoutTests:

* http/tests/workers/service/basic-register-exceptions-expected.txt:
* http/tests/workers/service/basic-register-expected.txt:
* http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/workers/service/basic-register-exceptions-expected.txt
LayoutTests/http/tests/workers/service/basic-register-expected.txt
LayoutTests/http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/WorkerScriptController.cpp
Source/WebCore/dom/EventTargetFactory.in
Source/WebCore/workers/WorkerGlobalScope.h
Source/WebCore/workers/service/ServiceWorkerContextData.cpp [new file with mode: 0644]
Source/WebCore/workers/service/ServiceWorkerContextData.h
Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp
Source/WebCore/workers/service/ServiceWorkerGlobalScope.h
Source/WebCore/workers/service/context/SWContextManager.cpp [new file with mode: 0644]
Source/WebCore/workers/service/context/SWContextManager.h [new file with mode: 0644]
Source/WebCore/workers/service/context/ServiceWorkerThread.cpp [new file with mode: 0644]
Source/WebCore/workers/service/context/ServiceWorkerThread.h [new file with mode: 0644]
Source/WebCore/workers/service/server/SWServer.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebProcess.cpp