Diff
Modified: branches/safari-605-branch/LayoutTests/fast/workers/WorkerGlobalScope-properties-prototype-expected.txt (227659 => 227660)
--- branches/safari-605-branch/LayoutTests/fast/workers/WorkerGlobalScope-properties-prototype-expected.txt 2018-01-26 05:03:13 UTC (rev 227659)
+++ branches/safari-605-branch/LayoutTests/fast/workers/WorkerGlobalScope-properties-prototype-expected.txt 2018-01-26 05:03:16 UTC (rev 227660)
@@ -9,12 +9,12 @@
self.__proto__.__proto__.hasOwnProperty('navigator') === true: true
self.__proto__.__proto__.hasOwnProperty('self') === true: true
self.__proto__.__proto__.hasOwnProperty('location') === true: true
-self.__proto__.__proto__.hasOwnProperty('close') === true: true
+self.__proto__.__proto__.hasOwnProperty('close') === false: true
self.__proto__.__proto__.hasOwnProperty('importScripts') === true: true
self.__proto__.__proto__.hasOwnProperty('indexedDB') === true: true
self.hasOwnProperty('navigator') === false: true
self.hasOwnProperty('location') === false: true
-self.hasOwnProperty('close') === false: true
+self.hasOwnProperty('close') === true: true
self.hasOwnProperty('postMessage') === true: true
self.hasOwnProperty('onmessage') === true: true
PASS successfullyParsed is true
Modified: branches/safari-605-branch/LayoutTests/fast/workers/WorkerGlobalScope-properties-prototype.html (227659 => 227660)
--- branches/safari-605-branch/LayoutTests/fast/workers/WorkerGlobalScope-properties-prototype.html 2018-01-26 05:03:13 UTC (rev 227659)
+++ branches/safari-605-branch/LayoutTests/fast/workers/WorkerGlobalScope-properties-prototype.html 2018-01-26 05:03:16 UTC (rev 227660)
@@ -14,12 +14,12 @@
worker.postMessage("eval self.__proto__.__proto__.hasOwnProperty('navigator') === true");
worker.postMessage("eval self.__proto__.__proto__.hasOwnProperty('self') === true");
worker.postMessage("eval self.__proto__.__proto__.hasOwnProperty('location') === true");
-worker.postMessage("eval self.__proto__.__proto__.hasOwnProperty('close') === true");
+worker.postMessage("eval self.__proto__.__proto__.hasOwnProperty('close') === false");
worker.postMessage("eval self.__proto__.__proto__.hasOwnProperty('importScripts') === true");
worker.postMessage("eval self.__proto__.__proto__.hasOwnProperty('indexedDB') === true");
worker.postMessage("eval self.hasOwnProperty('navigator') === false");
worker.postMessage("eval self.hasOwnProperty('location') === false");
-worker.postMessage("eval self.hasOwnProperty('close') === false");
+worker.postMessage("eval self.hasOwnProperty('close') === true");
// DedicatedWorkerGlobalScope properties should be on the instance.
worker.postMessage("eval self.hasOwnProperty('postMessage') === true");
Modified: branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog (227659 => 227660)
--- branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog 2018-01-26 05:03:13 UTC (rev 227659)
+++ branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog 2018-01-26 05:03:16 UTC (rev 227660)
@@ -1,3 +1,19 @@
+2018-01-25 Jason Marcell <[email protected]>
+
+ Cherry-pick r227578. rdar://problem/36873356
+
+ 2018-01-24 Chris Dumez <[email protected]>
+
+ close() operation should not be exposed inside a ServiceWorkerGlobalScope
+ https://bugs.webkit.org/show_bug.cgi?id=182057
+
+ Reviewed by Youenn Fablet.
+
+ Rebaseline WPT tests now that more checks are passing.
+
+ * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/close.https-expected.txt:
+ * web-platform-tests/workers/interfaces.worker-expected.txt:
+
2018-01-25 Ryan Haddad <[email protected]>
Work towards rdar://problem/36837397.
Modified: branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/close.https-expected.txt (227659 => 227660)
--- branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/close.https-expected.txt 2018-01-26 05:03:13 UTC (rev 227659)
+++ branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/close.https-expected.txt 2018-01-26 05:03:16 UTC (rev 227660)
@@ -1,4 +1,4 @@
PASS ServiceWorkerGlobalScope: close operation
-FAIL ServiceWorkerGlobalScope close operation assert_false: expected false got true
+PASS ServiceWorkerGlobalScope close operation
Modified: branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt (227659 => 227660)
--- branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt 2018-01-26 05:03:13 UTC (rev 227659)
+++ branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt 2018-01-26 05:03:16 UTC (rev 227660)
@@ -45,7 +45,7 @@
PASS DedicatedWorkerGlobalScope interface: existence and properties of interface prototype object's "constructor" property
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
+PASS DedicatedWorkerGlobalScope interface: operation close()
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
@@ -59,7 +59,7 @@
FAIL DedicatedWorkerGlobalScope interface: self must inherit property "name" with the proper type assert_own_property: expected property "name" missing
PASS DedicatedWorkerGlobalScope interface: self must inherit property "postMessage(any, [object Object])" with the proper type
PASS DedicatedWorkerGlobalScope interface: calling postMessage(any, [object Object]) on self with too few arguments must throw TypeError
-FAIL DedicatedWorkerGlobalScope interface: self must inherit property "close()" with the proper type assert_own_property: expected property "close" missing
+PASS DedicatedWorkerGlobalScope interface: self must inherit property "close()" with the proper type
PASS DedicatedWorkerGlobalScope interface: self must inherit property "onmessage" with the proper type
FAIL DedicatedWorkerGlobalScope interface: self must inherit property "onmessageerror" with the proper type assert_own_property: expected property "onmessageerror" missing
PASS WorkerGlobalScope interface: self must inherit property "self" with the proper type
Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (227659 => 227660)
--- branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-26 05:03:13 UTC (rev 227659)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-26 05:03:16 UTC (rev 227660)
@@ -1,5 +1,27 @@
2018-01-25 Jason Marcell <[email protected]>
+ Cherry-pick r227578. rdar://problem/36873356
+
+ 2018-01-24 Chris Dumez <[email protected]>
+
+ close() operation should not be exposed inside a ServiceWorkerGlobalScope
+ https://bugs.webkit.org/show_bug.cgi?id=182057
+
+ Reviewed by Youenn Fablet.
+
+ Move close() from WorkerGlobalScope to DedicatedWorkerGlobalScope as per:
+ - https://html.spec.whatwg.org/multipage/workers.html#dedicatedworkerglobalscope
+
+ This change to the specification was made to avoid exposing this deprecated
+ features to service workers (which are new).
+
+ No new tests, rebaselined existing test.
+
+ * workers/DedicatedWorkerGlobalScope.idl:
+ * workers/WorkerGlobalScope.idl:
+
+2018-01-25 Jason Marcell <[email protected]>
+
Cherry-pick r227567. rdar://problem/36873353
2018-01-24 Daniel Bates <[email protected]>
Modified: branches/safari-605-branch/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl (227659 => 227660)
--- branches/safari-605-branch/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl 2018-01-26 05:03:13 UTC (rev 227659)
+++ branches/safari-605-branch/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl 2018-01-26 05:03:16 UTC (rev 227660)
@@ -39,5 +39,7 @@
] interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
[CallWith=ScriptState, MayThrowException] void postMessage(any message, optional sequence<object> transfer = []);
+ void close();
+
attribute EventHandler onmessage;
};
Modified: branches/safari-605-branch/Source/WebCore/workers/WorkerGlobalScope.idl (227659 => 227660)
--- branches/safari-605-branch/Source/WebCore/workers/WorkerGlobalScope.idl 2018-01-26 05:03:13 UTC (rev 227659)
+++ branches/safari-605-branch/Source/WebCore/workers/WorkerGlobalScope.idl 2018-01-26 05:03:16 UTC (rev 227660)
@@ -35,7 +35,6 @@
readonly attribute WorkerGlobalScope self;
readonly attribute WorkerLocation location;
- void close();
attribute EventHandler onerror;
attribute EventHandler onoffline;