- Revision
- 225718
- Author
- cdu...@apple.com
- Date
- 2017-12-08 19:44:33 -0800 (Fri, 08 Dec 2017)
Log Message
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.
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:
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (225717 => 225718)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-12-09 03:03:06 UTC (rev 225717)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-12-09 03:44:33 UTC (rev 225718)
@@ -1,3 +1,15 @@
+2017-12-08 Chris Dumez <cdu...@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 <you...@apple.com>
FetchResponse should keep unfiltered ResourceResponse so that it can be used in Service Worker
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt (225717 => 225718)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt 2017-12-09 03:03:06 UTC (rev 225717)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/interfaces-sw.https-expected.txt 2017-12-09 03:44:33 UTC (rev 225718)
@@ -14,14 +14,14 @@
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
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt (225717 => 225718)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt 2017-12-09 03:03:06 UTC (rev 225717)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt 2017-12-09 03:44:33 UTC (rev 225718)
@@ -46,7 +46,7 @@
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
Modified: trunk/Source/WebCore/ChangeLog (225717 => 225718)
--- trunk/Source/WebCore/ChangeLog 2017-12-09 03:03:06 UTC (rev 225717)
+++ trunk/Source/WebCore/ChangeLog 2017-12-09 03:44:33 UTC (rev 225718)
@@ -1,3 +1,19 @@
+2017-12-08 Chris Dumez <cdu...@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 <beid...@apple.com>
Delay some service worker operations until after the database import completes.
Modified: trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl (225717 => 225718)
--- trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl 2017-12-09 03:03:06 UTC (rev 225717)
+++ trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl 2017-12-09 03:44:33 UTC (rev 225718)
@@ -33,6 +33,7 @@
Exposed=DedicatedWorker,
Global=(Worker,DedicatedWorker),
JSGenerateToNativeObject,
+ ImplicitThis,
IsImmutablePrototypeExoticObject,
IsImmutablePrototypeExoticObjectOnPrototype,
] interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.idl (225717 => 225718)
--- trunk/Source/WebCore/workers/WorkerGlobalScope.idl 2017-12-09 03:03:06 UTC (rev 225717)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.idl 2017-12-09 03:44:33 UTC (rev 225718)
@@ -28,6 +28,7 @@
Exposed=Worker,
JSCustomMarkFunction,
JSLegacyParent=JSWorkerGlobalScopeBase,
+ ImplicitThis,
IsImmutablePrototypeExoticObject,
IsImmutablePrototypeExoticObjectOnPrototype,
] interface WorkerGlobalScope : EventTarget {
Modified: trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl (225717 => 225718)
--- trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl 2017-12-09 03:03:06 UTC (rev 225717)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl 2017-12-09 03:44:33 UTC (rev 225718)
@@ -29,6 +29,7 @@
Exposed=ServiceWorker,
Conditional=SERVICE_WORKER,
EnabledAtRuntime=ServiceWorker,
+ ImplicitThis,
JSCustomMarkFunction,
IsImmutablePrototypeExoticObject,
IsImmutablePrototypeExoticObjectOnPrototype,