ServiceWorkerGlobalScope is a global object and should be marked as [ImplicitThis...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Dec 2017 03:44:33 +0000 (03:44 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Dec 2017 03:44:33 +0000 (03:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180615

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt:
* web-platform-tests/workers/interfaces.worker-expected.txt:

Source/WebCore:

ServiceWorkerGlobalScope is a global object and should be marked as [ImplicitThis] in the IDL, similarly to what we do for Window.
This allows a getter to be fallback to the global object as ThisValue when the cast of the ThisValue to the expected type fails.

No new tests, rebaselined existing test.

* workers/DedicatedWorkerGlobalScope.idl:
* workers/WorkerGlobalScope.idl:
* workers/service/ServiceWorkerGlobalScope.idl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/workers/DedicatedWorkerGlobalScope.idl
Source/WebCore/workers/WorkerGlobalScope.idl
Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl

index 292a045..56e67a1 100644 (file)
@@ -1,3 +1,15 @@
+2017-12-08  Chris Dumez  <cdumez@apple.com>
+
+        ServiceWorkerGlobalScope is a global object and should be marked as [ImplicitThis] in the IDL
+        https://bugs.webkit.org/show_bug.cgi?id=180615
+
+        Reviewed by Brady Eidson.
+
+        Rebaseline WPT tests now that more checks are passing.
+
+        * web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt:
+        * web-platform-tests/workers/interfaces.worker-expected.txt:
+
 2017-12-08  Youenn Fablet  <youenn@apple.com>
 
         FetchResponse should keep unfiltered ResourceResponse so that it can be used in Service Worker
index 4b8a7ad..438b16e 100644 (file)
@@ -14,14 +14,14 @@ PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of i
 PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to its original value via __proto__ should not throw 
 PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of interface prototype object - setting to its original value via Reflect.setPrototypeOf should return true 
 PASS ServiceWorkerGlobalScope interface: existence and properties of interface prototype object's "constructor" property 
-FAIL ServiceWorkerGlobalScope interface: attribute clients The ServiceWorkerGlobalScope.clients getter can only be used on instances of ServiceWorkerGlobalScope
-FAIL ServiceWorkerGlobalScope interface: attribute registration The ServiceWorkerGlobalScope.registration getter can only be used on instances of ServiceWorkerGlobalScope
+PASS ServiceWorkerGlobalScope interface: attribute clients 
+PASS ServiceWorkerGlobalScope interface: attribute registration 
 PASS ServiceWorkerGlobalScope interface: operation skipWaiting() 
-FAIL ServiceWorkerGlobalScope interface: attribute oninstall The ServiceWorkerGlobalScope.oninstall getter can only be used on instances of ServiceWorkerGlobalScope
-FAIL ServiceWorkerGlobalScope interface: attribute onactivate The ServiceWorkerGlobalScope.onactivate getter can only be used on instances of ServiceWorkerGlobalScope
-FAIL ServiceWorkerGlobalScope interface: attribute onfetch The ServiceWorkerGlobalScope.onfetch getter can only be used on instances of ServiceWorkerGlobalScope
-FAIL ServiceWorkerGlobalScope interface: attribute onmessage The ServiceWorkerGlobalScope.onmessage getter can only be used on instances of ServiceWorkerGlobalScope
-FAIL ServiceWorkerGlobalScope interface: attribute onmessageerror The ServiceWorkerGlobalScope.onmessageerror getter can only be used on instances of ServiceWorkerGlobalScope
+PASS ServiceWorkerGlobalScope interface: attribute oninstall 
+PASS ServiceWorkerGlobalScope interface: attribute onactivate 
+PASS ServiceWorkerGlobalScope interface: attribute onfetch 
+PASS ServiceWorkerGlobalScope interface: attribute onmessage 
+PASS ServiceWorkerGlobalScope interface: attribute onmessageerror 
 PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to a new value via Object.setPrototypeOf should throw a TypeError 
 PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to a new value via __proto__ should throw a TypeError 
 PASS ServiceWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to a new value via Reflect.setPrototypeOf should return false 
index 195e680..bdd35cb 100644 (file)
@@ -46,7 +46,7 @@ PASS DedicatedWorkerGlobalScope interface: existence and properties of interface
 FAIL DedicatedWorkerGlobalScope interface: attribute name assert_own_property: The global object must have a property "name" expected property "name" missing
 PASS DedicatedWorkerGlobalScope interface: operation postMessage(any, [object Object]) 
 FAIL DedicatedWorkerGlobalScope interface: operation close() assert_own_property: global object missing non-static operation expected property "close" missing
-FAIL DedicatedWorkerGlobalScope interface: attribute onmessage The DedicatedWorkerGlobalScope.onmessage getter can only be used on instances of DedicatedWorkerGlobalScope
+PASS DedicatedWorkerGlobalScope interface: attribute onmessage 
 FAIL DedicatedWorkerGlobalScope interface: attribute onmessageerror assert_own_property: The global object must have a property "onmessageerror" expected property "onmessageerror" missing
 PASS DedicatedWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to a new value via Object.setPrototypeOf should throw a TypeError 
 PASS DedicatedWorkerGlobalScope interface: internal [[SetPrototypeOf]] method of global platform object - setting to a new value via __proto__ should throw a TypeError 
index 2b78fdf..2db6d03 100644 (file)
@@ -1,3 +1,19 @@
+2017-12-08  Chris Dumez  <cdumez@apple.com>
+
+        ServiceWorkerGlobalScope is a global object and should be marked as [ImplicitThis] in the IDL
+        https://bugs.webkit.org/show_bug.cgi?id=180615
+
+        Reviewed by Brady Eidson.
+
+        ServiceWorkerGlobalScope is a global object and should be marked as [ImplicitThis] in the IDL, similarly to what we do for Window.
+        This allows a getter to be fallback to the global object as ThisValue when the cast of the ThisValue to the expected type fails.
+
+        No new tests, rebaselined existing test.
+
+        * workers/DedicatedWorkerGlobalScope.idl:
+        * workers/WorkerGlobalScope.idl:
+        * workers/service/ServiceWorkerGlobalScope.idl:
+
 2017-12-08  Brady Eidson  <beidson@apple.com>
 
         Delay some service worker operations until after the database import completes.
index 27c7414..2c1503f 100644 (file)
@@ -33,6 +33,7 @@
     Exposed=DedicatedWorker,
     Global=(Worker,DedicatedWorker),
     JSGenerateToNativeObject,
+    ImplicitThis,
     IsImmutablePrototypeExoticObject,
     IsImmutablePrototypeExoticObjectOnPrototype,
 ] interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
index 1e26cf5..d271fe1 100644 (file)
@@ -28,6 +28,7 @@
     Exposed=Worker,
     JSCustomMarkFunction,
     JSLegacyParent=JSWorkerGlobalScopeBase,
+    ImplicitThis,
     IsImmutablePrototypeExoticObject,
     IsImmutablePrototypeExoticObjectOnPrototype,
 ] interface WorkerGlobalScope : EventTarget {
index 6c466a4..4ab7168 100644 (file)
@@ -29,6 +29,7 @@
     Exposed=ServiceWorker,
     Conditional=SERVICE_WORKER,
     EnabledAtRuntime=ServiceWorker,
+    ImplicitThis,
     JSCustomMarkFunction,
     IsImmutablePrototypeExoticObject,
     IsImmutablePrototypeExoticObjectOnPrototype,