Title: [220344] trunk
Revision
220344
Author
[email protected]
Date
2017-08-07 11:22:05 -0700 (Mon, 07 Aug 2017)

Log Message

Implement most of ServiceWorkerContainer::addRegistration.
https://bugs.webkit.org/show_bug.cgi?id=175237

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

* web-platform-tests/FileAPI/historical.https-expected.txt:
* web-platform-tests/background-fetch/interfaces-worker.https-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-_javascript_-agent-formalism/canblock-serviceworker.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt:
* web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt:
* web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt:
* web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/general.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt:
* web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt:
* web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt:

Source/WebCore:

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

There's still so much supporting infrastructure to add with these early patches
that I'm still moving them in baby steps for now, hence not implementing
register() all in one shot.

Things will start moving very quickly once we no longer need to add lots of new
primitives in each change.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:

* page/DOMWindow.cpp:
(WebCore::DOMWindow::navigator const):

* page/Navigator.cpp:
(WebCore::Navigator::Navigator): Make the constructor take a ScriptExecutionContext for
  creation of objects where its import (e.g. ServiceWorkerContainer).
* page/Navigator.h:

* page/WorkerNavigator.cpp:
(WebCore::WorkerNavigator::WorkerNavigator): Ditto.
* page/WorkerNavigator.h:

* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::NavigatorBase): Create the ServiceWorkerContainer upfront with
  the passed-in ScriptExecutionContext.
(WebCore::NavigatorBase::serviceWorker):
* page/NavigatorBase.h:

Make ServiceWorkerContainer into an ActiveDOMObject. This will eventually be necessary for
Document suspension reasons, but is also necessary because it also needs to be a
ContextDestructionObserver (which ActiveDOMObject is):
* workers/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
(WebCore::ServiceWorkerContainer::ready):
(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::getRegistrations):
(WebCore::ServiceWorkerContainer::activeDOMObjectName const):
(WebCore::ServiceWorkerContainer::canSuspendForDocumentSuspension const):
(WebCore::rejectLater): Deleted.
(WebCore::ServiceWorkerContainer::eventTargetInterface const): Deleted.
(WebCore::ServiceWorkerContainer::scriptExecutionContext const): Deleted.
* workers/ServiceWorkerContainer.h:
* workers/ServiceWorkerContainer.idl:

Add updateViaCache, etc:
* workers/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::updateViaCache const):
(WebCore::ServiceWorkerRegistration::update):
(WebCore::ServiceWorkerRegistration::unregister):
* workers/ServiceWorkerRegistration.h:
* workers/ServiceWorkerRegistration.idl:

* workers/ServiceWorkerUpdateViaCache.h: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
* workers/ServiceWorkerUpdateViaCache.idl: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.

* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::navigator):
(WebCore::WorkerGlobalScope::navigator const): Deleted.
* workers/WorkerGlobalScope.h:

* workers/WorkerType.h: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
* workers/WorkerType.idl: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,53 @@
+2017-08-07  Brady Eidson  <[email protected]>
+
+        Implement most of ServiceWorkerContainer::addRegistration.
+        https://bugs.webkit.org/show_bug.cgi?id=175237
+
+        Reviewed by Andy Estes.
+
+        * web-platform-tests/FileAPI/historical.https-expected.txt:
+        * web-platform-tests/background-fetch/interfaces-worker.https-expected.txt:
+        * web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt:
+        * web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt:
+        * web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt:
+        * web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt:
+        * web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt:
+        * web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-_javascript_-agent-formalism/canblock-serviceworker.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt:
+        * web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt:
+        * web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/general.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt:
+        * web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt:
+
 2017-08-05  Youenn Fablet  <[email protected]>
 
         [Cache API] Add Cache and CacheStorage IDL definitions

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/historical.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
 PASS "toNativeLineEndings" should not be supported 
 FAIL "FileError" should not be supported assert_false: expected false got true
@@ -6,5 +7,5 @@
 PASS BlobBuilder should not be supported. 
 PASS createFor method should not be supported 
 PASS Blob.close() should not be supported 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/background-fetch/interfaces-worker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,7 +1,8 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 idlharness test
 
 This test validates the WebIDL included in the Background Fetch API (Service Workers).
 
 
-FAIL Service Worker-scoped tests. assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service Worker-scoped tests. assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Fetch in service worker: referrer with no-referrer policy assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Fetch in service worker: referrer with no-referrer policy assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Fetch in service worker: referrer with no-referrer policy assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Fetch in service worker: referrer with no-referrer policy assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Fetch in service worker: referrer with origin-when-cross-origin policy assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Fetch in service worker: referrer with origin-when-cross-origin policy assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Fetch in worker: referrer with unsafe-url policy assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Fetch in worker: referrer with unsafe-url policy assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/messageevent-constructor.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -6,5 +6,5 @@
 PASS initMessageEvent operation 
 PASS Passing null for ports parameter to initMessageEvent 
 PASS initMessageEvent operation default parameter values 
-FAIL Passing ServiceWorker for source member assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Passing ServiceWorker for source member assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-_javascript_-agent-formalism/canblock-serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-_javascript_-agent-formalism/canblock-serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-_javascript_-agent-formalism/canblock-serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Cache.add and Cache.addAll assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Cache.add and Cache.addAll assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-delete.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Cache.delete assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Cache.delete assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-keys.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Cache.keys assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Cache.keys assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-match.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Cache.match assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Cache.match assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-matchAll.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Cache.matchAll assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Cache.matchAll assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-put.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Cache.put assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Cache.put assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-keys.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL CacheStorage.keys assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL CacheStorage.keys assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage-match.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL CacheStorage.match assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL CacheStorage.match assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/cache-storage/serviceworker/cache-storage.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL CacheStorage assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL CacheStorage assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/byte-length-queuing-strategy.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/count-queuing-strategy.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-backward.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/close-propagation-forward.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/error-propagation-forward.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/flow-control.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/general.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/multiple-propagation.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/pipe-through.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/piping/transform-streams.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-byte-streams/general.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-strategies.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/bad-underlying-sources.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/brand-checks.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/cancel.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/garbage-collection.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/general.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/pipe-through.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/readable-stream-reader.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/tee.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt (220343 => 220344)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/streams/readable-streams/templated.serviceworker.https-expected.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,4 @@
+CONSOLE MESSAGE: line 153: TypeError: undefined is not an object (evaluating 'registration.unregister')
 
-FAIL Service worker test setup assert_unreached: unregister should not fail: ServiceWorkerContainer method 'getRegistration' not yet implemented Reached unreachable code
+FAIL Service worker test setup assert_unreached: unregister should not fail: serviceWorker.getRegistration() is not yet implemented Reached unreachable code
 

Modified: trunk/Source/WebCore/CMakeLists.txt (220343 => 220344)


--- trunk/Source/WebCore/CMakeLists.txt	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/CMakeLists.txt	2017-08-07 18:22:05 UTC (rev 220344)
@@ -712,9 +712,11 @@
     workers/ServiceWorkerContainer.idl
     workers/ServiceWorkerGlobalScope.idl
     workers/ServiceWorkerRegistration.idl
+    workers/ServiceWorkerUpdateViaCache.idl
     workers/Worker.idl
     workers/WorkerGlobalScope.idl
     workers/WorkerLocation.idl
+    workers/WorkerType.idl
 
     xml/DOMParser.idl
     xml/XMLHttpRequest.idl

Modified: trunk/Source/WebCore/ChangeLog (220343 => 220344)


--- trunk/Source/WebCore/ChangeLog	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/ChangeLog	2017-08-07 18:22:05 UTC (rev 220344)
@@ -1,3 +1,77 @@
+2017-08-07  Brady Eidson  <[email protected]>
+
+        Implement most of ServiceWorkerContainer::addRegistration.
+        https://bugs.webkit.org/show_bug.cgi?id=175237
+
+        Reviewed by Andy Estes.
+
+        No new tests (Covered by changes to existing tests).
+
+        There's still so much supporting infrastructure to add with these early patches
+        that I'm still moving them in baby steps for now, hence not implementing
+        register() all in one shot.
+        
+        Things will start moving very quickly once we no longer need to add lots of new
+        primitives in each change.
+        
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::navigator const):
+        
+        * page/Navigator.cpp:
+        (WebCore::Navigator::Navigator): Make the constructor take a ScriptExecutionContext for 
+          creation of objects where its import (e.g. ServiceWorkerContainer).
+        * page/Navigator.h:
+
+        * page/WorkerNavigator.cpp:
+        (WebCore::WorkerNavigator::WorkerNavigator): Ditto.
+        * page/WorkerNavigator.h:
+
+        * page/NavigatorBase.cpp:
+        (WebCore::NavigatorBase::NavigatorBase): Create the ServiceWorkerContainer upfront with
+          the passed-in ScriptExecutionContext.
+        (WebCore::NavigatorBase::serviceWorker):
+        * page/NavigatorBase.h:
+        
+        Make ServiceWorkerContainer into an ActiveDOMObject. This will eventually be necessary for
+        Document suspension reasons, but is also necessary because it also needs to be a
+        ContextDestructionObserver (which ActiveDOMObject is):
+        * workers/ServiceWorkerContainer.cpp:
+        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
+        (WebCore::ServiceWorkerContainer::ready):
+        (WebCore::ServiceWorkerContainer::addRegistration):
+        (WebCore::ServiceWorkerContainer::getRegistration):
+        (WebCore::ServiceWorkerContainer::getRegistrations):
+        (WebCore::ServiceWorkerContainer::activeDOMObjectName const):
+        (WebCore::ServiceWorkerContainer::canSuspendForDocumentSuspension const):
+        (WebCore::rejectLater): Deleted.
+        (WebCore::ServiceWorkerContainer::eventTargetInterface const): Deleted.
+        (WebCore::ServiceWorkerContainer::scriptExecutionContext const): Deleted.
+        * workers/ServiceWorkerContainer.h:
+        * workers/ServiceWorkerContainer.idl:
+
+        Add updateViaCache, etc:
+        * workers/ServiceWorkerRegistration.cpp:
+        (WebCore::ServiceWorkerRegistration::updateViaCache const):
+        (WebCore::ServiceWorkerRegistration::update):
+        (WebCore::ServiceWorkerRegistration::unregister):
+        * workers/ServiceWorkerRegistration.h:
+        * workers/ServiceWorkerRegistration.idl:
+
+        * workers/ServiceWorkerUpdateViaCache.h: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
+        * workers/ServiceWorkerUpdateViaCache.idl: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
+
+        * workers/WorkerGlobalScope.cpp:
+        (WebCore::WorkerGlobalScope::navigator):
+        (WebCore::WorkerGlobalScope::navigator const): Deleted.
+        * workers/WorkerGlobalScope.h:
+
+        * workers/WorkerType.h: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
+        * workers/WorkerType.idl: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
+
 2017-08-07  Ryan Haddad  <[email protected]>
 
         Unreviewed, rolling out r220299.

Modified: trunk/Source/WebCore/DerivedSources.make (220343 => 220344)


--- trunk/Source/WebCore/DerivedSources.make	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/DerivedSources.make	2017-08-07 18:22:05 UTC (rev 220344)
@@ -838,9 +838,11 @@
     $(WebCore)/workers/ServiceWorkerContainer.idl \
     $(WebCore)/workers/ServiceWorkerGlobalScope.idl \
     $(WebCore)/workers/ServiceWorkerRegistration.idl \
+    $(WebCore)/workers/ServiceWorkerUpdateViaCache.idl \
     $(WebCore)/workers/Worker.idl \
     $(WebCore)/workers/WorkerGlobalScope.idl \
     $(WebCore)/workers/WorkerLocation.idl \
+    $(WebCore)/workers/WorkerType.idl \
     $(WebCore)/xml/DOMParser.idl \
     $(WebCore)/xml/XMLHttpRequest.idl \
     $(WebCore)/xml/XMLHttpRequestEventTarget.idl \

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (220343 => 220344)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-08-07 18:22:05 UTC (rev 220344)
@@ -2470,6 +2470,12 @@
 		51EE7B3A1AA5123100F92B21 /* ResourceLoadInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51EE7B391AA5123100F92B21 /* ResourceLoadInfo.cpp */; };
 		51EEAA731BEFFAB100218008 /* IndexValueEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51EEAA711BEFFA7900218008 /* IndexValueEntry.cpp */; };
 		51EEAA741BEFFAB100218008 /* IndexValueEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EEAA721BEFFA7900218008 /* IndexValueEntry.h */; };
+		51F174FE1F35899200C74950 /* WorkerType.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F174FC1F35898800C74950 /* WorkerType.h */; };
+		51F174FF1F35899700C74950 /* ServiceWorkerUpdateViaCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F174FD1F35898800C74950 /* ServiceWorkerUpdateViaCache.h */; };
+		51F175021F358B3B00C74950 /* JSServiceWorkerUpdateViaCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F175001F358B3600C74950 /* JSServiceWorkerUpdateViaCache.cpp */; };
+		51F175031F358B3B00C74950 /* JSServiceWorkerUpdateViaCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F175011F358B3600C74950 /* JSServiceWorkerUpdateViaCache.h */; };
+		51F175061F358BF700C74950 /* JSWorkerType.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F175051F358BDE00C74950 /* JSWorkerType.h */; };
+		51F175071F358BF900C74950 /* JSWorkerType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F175041F358BDE00C74950 /* JSWorkerType.cpp */; };
 		51F798EF1BE880E7008AE491 /* IDBIndexInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F798EB1BE880D3008AE491 /* IDBIndexInfo.cpp */; };
 		51F798F01BE880E7008AE491 /* IDBIndexInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F798EC1BE880D3008AE491 /* IDBIndexInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		51F886BD1F326A9800C193EF /* JSServiceWorkerContainerCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F886BB1F326A9200C193EF /* JSServiceWorkerContainerCustom.cpp */; };
@@ -10246,6 +10252,14 @@
 		51EE7B391AA5123100F92B21 /* ResourceLoadInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceLoadInfo.cpp; sourceTree = "<group>"; };
 		51EEAA711BEFFA7900218008 /* IndexValueEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndexValueEntry.cpp; sourceTree = "<group>"; };
 		51EEAA721BEFFA7900218008 /* IndexValueEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexValueEntry.h; sourceTree = "<group>"; };
+		51F174FA1F3588D700C74950 /* WorkerType.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WorkerType.idl; sourceTree = "<group>"; };
+		51F174FB1F3588D700C74950 /* ServiceWorkerUpdateViaCache.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ServiceWorkerUpdateViaCache.idl; sourceTree = "<group>"; };
+		51F174FC1F35898800C74950 /* WorkerType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerType.h; sourceTree = "<group>"; };
+		51F174FD1F35898800C74950 /* ServiceWorkerUpdateViaCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerUpdateViaCache.h; sourceTree = "<group>"; };
+		51F175001F358B3600C74950 /* JSServiceWorkerUpdateViaCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSServiceWorkerUpdateViaCache.cpp; path = WebCore/JSServiceWorkerUpdateViaCache.cpp; sourceTree = "<group>"; };
+		51F175011F358B3600C74950 /* JSServiceWorkerUpdateViaCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSServiceWorkerUpdateViaCache.h; path = WebCore/JSServiceWorkerUpdateViaCache.h; sourceTree = "<group>"; };
+		51F175041F358BDE00C74950 /* JSWorkerType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWorkerType.cpp; sourceTree = "<group>"; };
+		51F175051F358BDE00C74950 /* JSWorkerType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWorkerType.h; sourceTree = "<group>"; };
 		51F6A3D50663BF04004D2919 /* HTMLCanvasElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLCanvasElement.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLCanvasElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		51F798EB1BE880D3008AE491 /* IDBIndexInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIndexInfo.cpp; sourceTree = "<group>"; };
@@ -17565,6 +17579,8 @@
 				5182C2341F3139FC0059BA7C /* ServiceWorkerRegistration.cpp */,
 				5182C2371F3139FC0059BA7C /* ServiceWorkerRegistration.h */,
 				5182C2321F3139FC0059BA7C /* ServiceWorkerRegistration.idl */,
+				51F174FD1F35898800C74950 /* ServiceWorkerUpdateViaCache.h */,
+				51F174FB1F3588D700C74950 /* ServiceWorkerUpdateViaCache.idl */,
 				2E4346330F546A8200B0F1BA /* Worker.cpp */,
 				2E4346340F546A8200B0F1BA /* Worker.h */,
 				2E4346350F546A8200B0F1BA /* Worker.idl */,
@@ -17593,6 +17609,8 @@
 				2EA768030FE7126400AB9C8A /* WorkerScriptLoaderClient.h */,
 				2E4346420F546A8200B0F1BA /* WorkerThread.cpp */,
 				2E4346430F546A8200B0F1BA /* WorkerThread.h */,
+				51F174FC1F35898800C74950 /* WorkerType.h */,
+				51F174FA1F3588D700C74950 /* WorkerType.idl */,
 			);
 			path = workers;
 			sourceTree = "<group>";
@@ -18640,6 +18658,8 @@
 				5182C2521F3142500059BA7C /* JSServiceWorker.h */,
 				5182C2511F3142500059BA7C /* JSServiceWorkerContainer.cpp */,
 				5182C2541F3142500059BA7C /* JSServiceWorkerContainer.h */,
+				51F175001F358B3600C74950 /* JSServiceWorkerUpdateViaCache.cpp */,
+				51F175011F358B3600C74950 /* JSServiceWorkerUpdateViaCache.h */,
 				5182C24E1F3142500059BA7C /* JSServiceWorkerGlobalScope.cpp */,
 				5182C24D1F3142500059BA7C /* JSServiceWorkerGlobalScope.h */,
 				5182C24F1F3142500059BA7C /* JSServiceWorkerRegistration.cpp */,
@@ -24735,6 +24755,8 @@
 				E1C362ED0EAF2AA9007410BC /* JSWorkerLocation.h */,
 				E1271A570EEECDE400F61213 /* JSWorkerNavigator.cpp */,
 				E1271A560EEECDE400F61213 /* JSWorkerNavigator.h */,
+				51F175041F358BDE00C74950 /* JSWorkerType.cpp */,
+				51F175051F358BDE00C74950 /* JSWorkerType.h */,
 			);
 			name = Threads;
 			sourceTree = "<group>";
@@ -27488,6 +27510,7 @@
 				316BDBF71E762AD500DE0D5A /* GPUDepthStencilDescriptor.h in Headers */,
 				316BDBF01E76292000DE0D5A /* GPUDepthStencilState.h in Headers */,
 				316BDB861E6E0A2700DE0D5A /* GPUDevice.h in Headers */,
+				51F174FE1F35899200C74950 /* WorkerType.h in Headers */,
 				316BDBCD1E75F18400DE0D5A /* GPUDrawable.h in Headers */,
 				316BDBFB1E762D0400DE0D5A /* GPUEnums.h in Headers */,
 				316BDB951E70C89700DE0D5A /* GPUFunction.h in Headers */,
@@ -27576,6 +27599,7 @@
 				A871D45C0A127CBC00B12A68 /* HTMLEmbedElement.h in Headers */,
 				977B386A122883E900B81FF8 /* HTMLEntityParser.h in Headers */,
 				977B386C122883E900B81FF8 /* HTMLEntitySearch.h in Headers */,
+				51F174FF1F35899700C74950 /* ServiceWorkerUpdateViaCache.h in Headers */,
 				977B386D122883E900B81FF8 /* HTMLEntityTable.h in Headers */,
 				A81369D4097374F600D74463 /* HTMLFieldSetElement.h in Headers */,
 				A8CFF7A60A156978000A4234 /* HTMLFontElement.h in Headers */,
@@ -28524,6 +28548,7 @@
 				6E3FAD3914733F4000E42306 /* JSWebGLCompressedTextureS3TC.h in Headers */,
 				6EE8A77310F803F3005A4A24 /* JSWebGLContextAttributes.h in Headers */,
 				BC2CBF4E140F1ABD003879BE /* JSWebGLContextEvent.h in Headers */,
+				51F175061F358BF700C74950 /* JSWorkerType.h in Headers */,
 				6E3FAD3914733F4011E42307 /* JSWebGLDebugRendererInfo.h in Headers */,
 				6E3FAD3914733F4022E42307 /* JSWebGLDebugShaders.h in Headers */,
 				6E3FAD3914733F4000E42307 /* JSWebGLDepthTexture.h in Headers */,
@@ -28806,6 +28831,7 @@
 				413E00791DB0E4F2002341D2 /* MemoryRelease.h in Headers */,
 				93309DFA099E64920056E581 /* MergeIdenticalElementsCommand.h in Headers */,
 				E1ADECCE0E76AD8B004A1A5E /* MessageChannel.h in Headers */,
+				51F175031F358B3B00C74950 /* JSServiceWorkerUpdateViaCache.h in Headers */,
 				75793E840D0CE0B3007FC0AC /* MessageEvent.h in Headers */,
 				E1ADECBF0E76ACF1004A1A5E /* MessagePort.h in Headers */,
 				41BF700C0FE86F49005E8DEC /* MessagePortChannel.h in Headers */,
@@ -32181,6 +32207,7 @@
 				12A253E01C8FFF6600C22295 /* JSKeyframeEffect.cpp in Sources */,
 				935F45420F7C3B5F00D7C1FB /* JSLazyEventListener.cpp in Sources */,
 				BCE1C43B0D9830D3003B02F2 /* JSLocation.cpp in Sources */,
+				51F175071F358BF900C74950 /* JSWorkerType.cpp in Sources */,
 				BCE1C4400D9830F4003B02F2 /* JSLocationCustom.cpp in Sources */,
 				93A8061F1E03B585008A1F26 /* JSLongRange.cpp in Sources */,
 				8FAC774D119872CB0015AE94 /* JSMainThreadExecState.cpp in Sources */,
@@ -33818,6 +33845,7 @@
 				7AF9B20218CFB2DF00C64BEF /* VTTRegion.cpp in Sources */,
 				7AF9B20518CFB2DF00C64BEF /* VTTRegionList.cpp in Sources */,
 				7A93868518DCC14500B8263D /* VTTScanner.cpp in Sources */,
+				51F175021F358B3B00C74950 /* JSServiceWorkerUpdateViaCache.cpp in Sources */,
 				A14832B1187F61E100DA63A6 /* WAKAppKitStubs.m in Sources */,
 				A14832B3187F629100DA63A6 /* WAKClipView.m in Sources */,
 				A14832B5187F62FC00DA63A6 /* WAKResponder.m in Sources */,

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (220343 => 220344)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2017-08-07 18:22:05 UTC (rev 220344)
@@ -786,8 +786,12 @@
 {
     if (!isCurrentlyDisplayedInFrame())
         return nullptr;
-    if (!m_navigator)
-        m_navigator = Navigator::create(*m_frame);
+
+    if (!m_navigator) {
+        ASSERT(scriptExecutionContext());
+        m_navigator = Navigator::create(*scriptExecutionContext(), *m_frame);
+    }
+
     return m_navigator.get();
 }
 

Modified: trunk/Source/WebCore/page/Navigator.cpp (220343 => 220344)


--- trunk/Source/WebCore/page/Navigator.cpp	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/page/Navigator.cpp	2017-08-07 18:22:05 UTC (rev 220344)
@@ -43,8 +43,9 @@
 
 namespace WebCore {
 
-Navigator::Navigator(Frame& frame)
-    : DOMWindowProperty(&frame)
+Navigator::Navigator(ScriptExecutionContext& context, Frame& frame)
+    : NavigatorBase(context)
+    , DOMWindowProperty(&frame)
 {
 }
 

Modified: trunk/Source/WebCore/page/Navigator.h (220343 => 220344)


--- trunk/Source/WebCore/page/Navigator.h	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/page/Navigator.h	2017-08-07 18:22:05 UTC (rev 220344)
@@ -31,7 +31,7 @@
 
 class Navigator final : public NavigatorBase, public ScriptWrappable, public DOMWindowProperty, public Supplementable<Navigator> {
 public:
-    static Ref<Navigator> create(Frame& frame) { return adoptRef(*new Navigator(frame)); }
+    static Ref<Navigator> create(ScriptExecutionContext& context, Frame& frame) { return adoptRef(*new Navigator(context, frame)); }
     virtual ~Navigator();
 
     String appVersion() const;
@@ -48,7 +48,7 @@
     void getStorageUpdates();
 
 private:
-    explicit Navigator(Frame&);
+    explicit Navigator(ScriptExecutionContext&, Frame&);
 
     mutable RefPtr<DOMPluginArray> m_plugins;
     mutable RefPtr<DOMMimeTypeArray> m_mimeTypes;

Modified: trunk/Source/WebCore/page/NavigatorBase.cpp (220343 => 220344)


--- trunk/Source/WebCore/page/NavigatorBase.cpp	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/page/NavigatorBase.cpp	2017-08-07 18:22:05 UTC (rev 220344)
@@ -75,6 +75,16 @@
 
 namespace WebCore {
 
+NavigatorBase::NavigatorBase(ScriptExecutionContext& context)
+#if ENABLE(SERVICE_WORKER)
+    : m_serviceWorkerContainer(makeUniqueRef<ServiceWorkerContainer>(context, *this))
+#endif
+{
+#if !ENABLE(SERVICE_WORKER)
+    UNUSED_PARAM(context);
+#endif
+}
+
 NavigatorBase::~NavigatorBase()
 {
 }
@@ -148,10 +158,7 @@
 #if ENABLE(SERVICE_WORKER)
 ServiceWorkerContainer* NavigatorBase::serviceWorker()
 {
-    if (!m_serviceWorkerContainer)
-        m_serviceWorkerContainer = ServiceWorkerContainer::create(*this);
-
-    return m_serviceWorkerContainer.get();
+    return &m_serviceWorkerContainer;
 }
 #endif
 

Modified: trunk/Source/WebCore/page/NavigatorBase.h (220343 => 220344)


--- trunk/Source/WebCore/page/NavigatorBase.h	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/page/NavigatorBase.h	2017-08-07 18:22:05 UTC (rev 220344)
@@ -28,10 +28,13 @@
 #include "ServiceWorkerContainer.h"
 #include <wtf/Forward.h>
 #include <wtf/RefCounted.h>
+#include <wtf/UniqueRef.h>
 #include <wtf/Vector.h>
 
 namespace WebCore {
 
+class ScriptExecutionContext;
+
 class NavigatorBase : public RefCounted<NavigatorBase> {
 public:
     virtual ~NavigatorBase();
@@ -52,12 +55,15 @@
     static String language();
     static Vector<String> languages();
 
+protected:
+    explicit NavigatorBase(ScriptExecutionContext&);
+
 #if ENABLE(SERVICE_WORKER)
 public:
     ServiceWorkerContainer* serviceWorker();
 
 private:
-    std::unique_ptr<ServiceWorkerContainer> m_serviceWorkerContainer;
+    UniqueRef<ServiceWorkerContainer> m_serviceWorkerContainer;
 #endif
 };
 

Modified: trunk/Source/WebCore/page/WorkerNavigator.cpp (220343 => 220344)


--- trunk/Source/WebCore/page/WorkerNavigator.cpp	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/page/WorkerNavigator.cpp	2017-08-07 18:22:05 UTC (rev 220344)
@@ -29,8 +29,9 @@
 
 namespace WebCore {
 
-WorkerNavigator::WorkerNavigator(const String& userAgent)
-    : m_userAgent(userAgent)
+WorkerNavigator::WorkerNavigator(ScriptExecutionContext& context, const String& userAgent)
+    : NavigatorBase(context)
+    , m_userAgent(userAgent)
 {
 }
 

Modified: trunk/Source/WebCore/page/WorkerNavigator.h (220343 => 220344)


--- trunk/Source/WebCore/page/WorkerNavigator.h	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/page/WorkerNavigator.h	2017-08-07 18:22:05 UTC (rev 220344)
@@ -33,12 +33,12 @@
 
 class WorkerNavigator final : public NavigatorBase, public Supplementable<WorkerNavigator> {
 public:
-    static Ref<WorkerNavigator> create(const String& userAgent) { return adoptRef(*new WorkerNavigator(userAgent)); }
+    static Ref<WorkerNavigator> create(ScriptExecutionContext& context, const String& userAgent) { return adoptRef(*new WorkerNavigator(context, userAgent)); }
 
     String userAgent() const final;
 
 private:
-    explicit WorkerNavigator(const String&);
+    explicit WorkerNavigator(ScriptExecutionContext&, const String&);
 
     String m_userAgent;
 };

Modified: trunk/Source/WebCore/workers/ServiceWorkerContainer.cpp (220343 => 220344)


--- trunk/Source/WebCore/workers/ServiceWorkerContainer.cpp	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/workers/ServiceWorkerContainer.cpp	2017-08-07 18:22:05 UTC (rev 220344)
@@ -31,21 +31,18 @@
 #include "Exception.h"
 #include "JSDOMPromiseDeferred.h"
 #include "NavigatorBase.h"
+#include "ScriptExecutionContext.h"
+#include "URL.h"
 #include <wtf/RunLoop.h>
 
 namespace WebCore {
 
-static void rejectLater(Ref<DeferredPromise>&& promise, const String& methodName)
+ServiceWorkerContainer::ServiceWorkerContainer(ScriptExecutionContext& context, NavigatorBase& navigator)
+    : ActiveDOMObject(&context)
+    , m_navigator(navigator)
 {
-    RunLoop::current().dispatch([promise = WTFMove(promise), methodName] {
-        promise->reject(Exception(UnknownError, makeString("ServiceWorkerContainer method '", methodName, "' not yet implemented")));
-    });
+    suspendIfNeeded();
 }
-
-ServiceWorkerContainer::ServiceWorkerContainer(NavigatorBase& navigator)
-    : m_navigator(navigator)
-{
-}
 void ServiceWorkerContainer::refEventTarget()
 {
     m_navigator.ref();
@@ -63,22 +60,57 @@
 
 void ServiceWorkerContainer::ready(Ref<DeferredPromise>&& promise)
 {
-    rejectLater(WTFMove(promise), "ready");
+    promise->reject(Exception { UnknownError, ASCIILiteral("serviceWorker.ready() is not yet implemented") });
 }
 
-void ServiceWorkerContainer::addRegistration(const String&, const RegistrationOptions&, Ref<DeferredPromise>&& promise)
+void ServiceWorkerContainer::addRegistration(const String& relativeScriptURL, const RegistrationOptions& options, Ref<DeferredPromise>&& promise)
 {
-    rejectLater(WTFMove(promise), "addRegistration");
+    auto* context = scriptExecutionContext();
+    if (!context) {
+        ASSERT_NOT_REACHED();
+        return;
+    }
+
+    if (relativeScriptURL.isEmpty()) {
+        promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() cannot be called with an empty script URL") });
+        return;
+    }
+
+    auto scriptURL = context->completeURL(relativeScriptURL);
+    if (!scriptURL.isValid()) {
+        promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() must be called with a valid relative script URL") });
+        return;
+    }
+
+    // FIXME: The spec disallows scripts outside of HTTP(S), but we'll likely support app custom URL schemes in WebKit.
+    if (!scriptURL.protocolIsInHTTPFamily()) {
+        promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() must be called with a script URL whose protocol is either HTTP or HTTPS") });
+        return;
+    }
+
+    String path = scriptURL.path();
+    if (path.containsIgnoringASCIICase("%2f") || path.containsIgnoringASCIICase("%5c")) {
+        promise->reject(Exception { TypeError, ASCIILiteral("serviceWorker.register() must be called with a script URL whose path does not contain '%%2f' or '%%5c'") });
+        return;
+    }
+
+    String scope = options.scope.isEmpty() ? ASCIILiteral("./") : options.scope;
+    auto scopeURL = context->completeURL(scope);
+
+    // FIXME: At this point, create a Register job and add it to the job queue
+    UNUSED_PARAM(scopeURL);
+
+    promise->reject(Exception { UnknownError, ASCIILiteral("serviceWorker.register() is not yet implemented") });
 }
 
 void ServiceWorkerContainer::getRegistration(const String&, Ref<DeferredPromise>&& promise)
 {
-    rejectLater(WTFMove(promise), "getRegistration");
+    promise->reject(Exception { UnknownError, ASCIILiteral("serviceWorker.getRegistration() is not yet implemented") });
 }
 
 void ServiceWorkerContainer::getRegistrations(Ref<DeferredPromise>&& promise)
 {
-    rejectLater(WTFMove(promise), "getRegistrations");
+    promise->reject(Exception { UnknownError, ASCIILiteral("serviceWorker.getRegistrations() is not yet implemented") });
 }
 
 void ServiceWorkerContainer::startMessages()
@@ -85,14 +117,14 @@
 {
 }
 
-EventTargetInterface ServiceWorkerContainer::eventTargetInterface() const
+const char* ServiceWorkerContainer::activeDOMObjectName() const
 {
-    return ServiceWorkerContainerEventTargetInterfaceType;
+    return "ServiceWorkerContainer";
 }
 
-ScriptExecutionContext* ServiceWorkerContainer::scriptExecutionContext() const
+bool ServiceWorkerContainer::canSuspendForDocumentSuspension() const
 {
-    return nullptr;
+    return true;
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/workers/ServiceWorkerContainer.h (220343 => 220344)


--- trunk/Source/WebCore/workers/ServiceWorkerContainer.h	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/workers/ServiceWorkerContainer.h	2017-08-07 18:22:05 UTC (rev 220344)
@@ -27,6 +27,7 @@
 
 #if ENABLE(SERVICE_WORKER)
 
+#include "ActiveDOMObject.h"
 #include "EventTarget.h"
 
 namespace WebCore {
@@ -35,17 +36,18 @@
 class NavigatorBase;
 class ServiceWorker;
 
-class ServiceWorkerContainer final : public EventTargetWithInlineData {
+enum class ServiceWorkerUpdateViaCache;
+enum class WorkerType;
+
+class ServiceWorkerContainer final : public EventTargetWithInlineData, public ActiveDOMObject {
 public:
-    static std::unique_ptr<ServiceWorkerContainer> create(NavigatorBase& navigator)
-    {
-        return std::make_unique<ServiceWorkerContainer>(navigator);
-    }
-    explicit ServiceWorkerContainer(NavigatorBase&);
+    ServiceWorkerContainer(ScriptExecutionContext&, NavigatorBase&);
     virtual ~ServiceWorkerContainer() = default;
 
     struct RegistrationOptions {
         String scope;
+        WorkerType type;
+        ServiceWorkerUpdateViaCache updateViaCache;
     };
 
     ServiceWorker* controller() const;
@@ -58,8 +60,10 @@
     void startMessages();
 
 private:
-    virtual EventTargetInterface eventTargetInterface() const;
-    virtual ScriptExecutionContext* scriptExecutionContext() const;
+    const char* activeDOMObjectName() const final;
+    bool canSuspendForDocumentSuspension() const final;
+    ScriptExecutionContext* scriptExecutionContext() const final { return ActiveDOMObject::scriptExecutionContext(); }
+    EventTargetInterface eventTargetInterface() const final { return ServiceWorkerContainerEventTargetInterfaceType; }
     void refEventTarget() final;
     void derefEventTarget() final;
 

Modified: trunk/Source/WebCore/workers/ServiceWorkerContainer.idl (220343 => 220344)


--- trunk/Source/WebCore/workers/ServiceWorkerContainer.idl	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/workers/ServiceWorkerContainer.idl	2017-08-07 18:22:05 UTC (rev 220344)
@@ -49,8 +49,6 @@
 
 dictionary RegistrationOptions {
     USVString scope;
-
-    // FIXME: Add these back after first round of IDL stubbing.
-    // WorkerType type = "classic";
-    // ServiceWorkerUpdateViaCache updateViaCache = "imports";
+    WorkerType type = "classic";
+    ServiceWorkerUpdateViaCache updateViaCache = "imports";
 };

Modified: trunk/Source/WebCore/workers/ServiceWorkerRegistration.cpp (220343 => 220344)


--- trunk/Source/WebCore/workers/ServiceWorkerRegistration.cpp	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/workers/ServiceWorkerRegistration.cpp	2017-08-07 18:22:05 UTC (rev 220344)
@@ -50,14 +50,21 @@
     return emptyString();
 }
 
-void ServiceWorkerRegistration::update(Ref<DeferredPromise>&&)
+ServiceWorkerRegistration::UpdateViaCache ServiceWorkerRegistration::updateViaCache() const
 {
+    return UpdateViaCache::Imports;
 }
 
-void ServiceWorkerRegistration::unregister(Ref<DeferredPromise>&&)
+void ServiceWorkerRegistration::update(Ref<DeferredPromise>&& promise)
 {
+    promise->reject(Exception(UnknownError, ASCIILiteral("ServiceWorkerRegistration::update not yet implemented")));
 }
 
+void ServiceWorkerRegistration::unregister(Ref<DeferredPromise>&& promise)
+{
+    promise->reject(Exception(UnknownError, ASCIILiteral("ServiceWorkerRegistration::unregister not yet implemented")));
+}
+
 EventTargetInterface ServiceWorkerRegistration::eventTargetInterface() const
 {
     return ServiceWorkerRegistrationEventTargetInterfaceType;

Modified: trunk/Source/WebCore/workers/ServiceWorkerRegistration.h (220343 => 220344)


--- trunk/Source/WebCore/workers/ServiceWorkerRegistration.h	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/workers/ServiceWorkerRegistration.h	2017-08-07 18:22:05 UTC (rev 220344)
@@ -37,6 +37,12 @@
 
 class ServiceWorkerRegistration final : public EventTargetWithInlineData {
 public:
+    enum class UpdateViaCache {
+        Imports,
+        All,
+        None,
+    };
+
     static Ref<ServiceWorkerRegistration> create(Frame& frame) { return adoptRef(*new ServiceWorkerRegistration(frame)); }
     virtual ~ServiceWorkerRegistration() = default;
 
@@ -45,6 +51,7 @@
     ServiceWorker* active();
 
     const String& scope() const;
+    UpdateViaCache updateViaCache() const;
 
     void update(Ref<DeferredPromise>&&);
     void unregister(Ref<DeferredPromise>&&);

Modified: trunk/Source/WebCore/workers/ServiceWorkerRegistration.idl (220343 => 220344)


--- trunk/Source/WebCore/workers/ServiceWorkerRegistration.idl	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/workers/ServiceWorkerRegistration.idl	2017-08-07 18:22:05 UTC (rev 220344)
@@ -37,10 +37,8 @@
     readonly attribute ServiceWorker? active;
 
     readonly attribute USVString scope;
+    readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
 
-    // FIXME: Implement when ready.
-    // readonly attribute ServiceWorkerUpdateViaCache updateViaCache;
-
     [NewObject] Promise<void> update();
     [NewObject] Promise<boolean> unregister();
 
@@ -47,3 +45,9 @@
     // event
     attribute EventHandler onupdatefound;
 };
+
+enum ServiceWorkerUpdateViaCache {
+    "imports",
+    "all",
+    "none"
+};

Copied: trunk/Source/WebCore/workers/ServiceWorkerUpdateViaCache.h (from rev 220343, trunk/Source/WebCore/workers/ServiceWorkerRegistration.idl) (0 => 220344)


--- trunk/Source/WebCore/workers/ServiceWorkerUpdateViaCache.h	                        (rev 0)
+++ trunk/Source/WebCore/workers/ServiceWorkerUpdateViaCache.h	2017-08-07 18:22:05 UTC (rev 220344)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(SERVICE_WORKER)
+
+namespace WebCore {
+
+enum class ServiceWorkerUpdateViaCache {
+    Imports,
+    All,
+    None,
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SERVICE_WORKER)

Copied: trunk/Source/WebCore/workers/ServiceWorkerUpdateViaCache.idl (from rev 220343, trunk/Source/WebCore/workers/ServiceWorkerRegistration.idl) (0 => 220344)


--- trunk/Source/WebCore/workers/ServiceWorkerUpdateViaCache.idl	                        (rev 0)
+++ trunk/Source/WebCore/workers/ServiceWorkerUpdateViaCache.idl	2017-08-07 18:22:05 UTC (rev 220344)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+[Conditional=SERVICE_WORKER] enum ServiceWorkerUpdateViaCache {
+    "imports",
+    "all",
+    "none"
+};

Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (220343 => 220344)


--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp	2017-08-07 18:22:05 UTC (rev 220344)
@@ -190,10 +190,10 @@
     } });
 }
 
-WorkerNavigator& WorkerGlobalScope::navigator() const
+WorkerNavigator& WorkerGlobalScope::navigator()
 {
     if (!m_navigator)
-        m_navigator = WorkerNavigator::create(m_userAgent);
+        m_navigator = WorkerNavigator::create(*this, m_userAgent);
     return *m_navigator;
 }
 

Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (220343 => 220344)


--- trunk/Source/WebCore/workers/WorkerGlobalScope.h	2017-08-07 17:06:58 UTC (rev 220343)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h	2017-08-07 18:22:05 UTC (rev 220344)
@@ -81,7 +81,7 @@
     void close();
 
     virtual ExceptionOr<void> importScripts(const Vector<String>& urls);
-    WorkerNavigator& navigator() const;
+    WorkerNavigator& navigator();
 
     ExceptionOr<int> setTimeout(JSC::ExecState&, std::unique_ptr<ScheduledAction>, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments);
     void clearTimeout(int timeoutId);

Copied: trunk/Source/WebCore/workers/WorkerType.h (from rev 220343, trunk/Source/WebCore/workers/ServiceWorkerRegistration.idl) (0 => 220344)


--- trunk/Source/WebCore/workers/WorkerType.h	                        (rev 0)
+++ trunk/Source/WebCore/workers/WorkerType.h	2017-08-07 18:22:05 UTC (rev 220344)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class WorkerType {
+    Classic,
+    Module,
+};
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/workers/WorkerType.idl (from rev 220343, trunk/Source/WebCore/workers/ServiceWorkerRegistration.idl) (0 => 220344)


--- trunk/Source/WebCore/workers/WorkerType.idl	                        (rev 0)
+++ trunk/Source/WebCore/workers/WorkerType.idl	2017-08-07 18:22:05 UTC (rev 220344)
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+enum WorkerType {
+    "classic",
+    "module"
+};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to