Title: [200722] branches/safari-601-branch

Diff

Modified: branches/safari-601-branch/LayoutTests/ChangeLog (200721 => 200722)


--- branches/safari-601-branch/LayoutTests/ChangeLog	2016-05-12 01:31:21 UTC (rev 200721)
+++ branches/safari-601-branch/LayoutTests/ChangeLog	2016-05-12 01:31:26 UTC (rev 200722)
@@ -1,3 +1,25 @@
+2016-05-11  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r200375. rdar://problem/26066673
+
+    2016-05-03  Pranjal Jumde  <pju...@apple.com>
+
+            WorkerGlobalScope's self, location and navigator attributes should not be replaceable
+            https://bugs.webkit.org/show_bug.cgi?id=157296
+            <rdar://problem/25962738>
+
+            Reviewed by Chris Dumez.
+
+            * http/tests/workers/location-readonly-expected.txt: Added.
+            * http/tests/workers/location-readonly.html: Added.
+            * http/tests/workers/navigator-readonly-expected.txt: Added.
+            * http/tests/workers/navigator-readonly.html: Added.
+            * http/tests/workers/self-readonly-expected.txt: Added.
+            * http/tests/workers/self-readonly.html: Added.
+            * http/tests/workers/worker-location.js: Added.
+            * http/tests/workers/worker-navigator.js: Added.
+            * http/tests/workers/worker-self.js: Added.
+
 2016-05-04  Matthew Hanson  <matthew_han...@apple.com>
 
         Merge r200376. rdar://problem/25991928

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/location-readonly-expected.txt (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/location-readonly-expected.txt	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/location-readonly-expected.txt	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: line 9: 127.0.0.1
+Test passes if "127.0.0.1" is returned by the worker.

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/location-readonly.html (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/location-readonly.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/location-readonly.html	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,12 @@
+Test passes if "127.0.0.1" is returned by the worker.
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+w = new Worker('worker-location.js');
+w._onmessage_ = function(e){
+    console.log(e.data);
+    testRunner.notifyDone();
+}
+</script>

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/navigator-readonly-expected.txt (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/navigator-readonly-expected.txt	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/navigator-readonly-expected.txt	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: line 9: Netscape
+Test passes if "Netscape" is returned by the worker.

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/navigator-readonly.html (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/navigator-readonly.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/navigator-readonly.html	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,12 @@
+Test passes if "Netscape" is returned by the worker.
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+w = new Worker('worker-navigator.js');
+w._onmessage_ = function(e){
+    console.log(e.data);
+    testRunner.notifyDone();
+}
+</script>

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/self-readonly-expected.txt (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/self-readonly-expected.txt	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/self-readonly-expected.txt	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,2 @@
+CONSOLE MESSAGE: line 9: NaN
+Test passes if "NaN" is returned by the worker.

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/self-readonly.html (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/self-readonly.html	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/self-readonly.html	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,12 @@
+Test passes if "NaN" is returned by the worker.
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+w = new Worker('worker-self.js');
+w._onmessage_ = function(e){
+    console.log(e.data);
+    testRunner.notifyDone();
+}
+</script>

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/worker-location.js (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/worker-location.js	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/worker-location.js	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,3 @@
+location = {};
+location.hostname = "FAIL";
+postMessage(location.hostname);

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/worker-navigator.js (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/worker-navigator.js	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/worker-navigator.js	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,3 @@
+navigator = {};
+navigator.appName = "FAIL";
+postMessage(navigator.appName);

Added: branches/safari-601-branch/LayoutTests/http/tests/workers/worker-self.js (0 => 200722)


--- branches/safari-601-branch/LayoutTests/http/tests/workers/worker-self.js	                        (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/workers/worker-self.js	2016-05-12 01:31:26 UTC (rev 200722)
@@ -0,0 +1,3 @@
+self = {};
+self.NaN = "100";
+postMessage(self.NaN);

Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (200721 => 200722)


--- branches/safari-601-branch/Source/WebCore/ChangeLog	2016-05-12 01:31:21 UTC (rev 200721)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog	2016-05-12 01:31:26 UTC (rev 200722)
@@ -1,3 +1,23 @@
+2016-05-11  Matthew Hanson  <matthew_han...@apple.com>
+
+        Merge r200375. rdar://problem/26066673
+
+    2016-05-03  Pranjal Jumde  <pju...@apple.com>
+
+            WorkerGlobalScope's self, location and navigator attributes should not be replaceable
+            https://bugs.webkit.org/show_bug.cgi?id=157296
+            <rdar://problem/25962738>
+
+            Reviewed by Chris Dumez.
+
+            Tests: http/tests/workers/location-readonly.html
+                   http/tests/workers/navigator-readonly.html
+                   http/tests/workers/self-readonly.html
+
+            * workers/WorkerGlobalScope.idl:
+            The 'self', 'location', and 'navigator' properties of the WorkerGlobalScope must be immutable.
+            See: https://html.spec.whatwg.org/multipage/workers.html#the-workerglobalscope-common-interface
+
 2016-04-22  Matthew Hanson  <matthew_han...@apple.com>
 
         Merge r199881. rdar://problem/25879498

Modified: branches/safari-601-branch/Source/WebCore/workers/WorkerGlobalScope.idl (200721 => 200722)


--- branches/safari-601-branch/Source/WebCore/workers/WorkerGlobalScope.idl	2016-05-12 01:31:21 UTC (rev 200721)
+++ branches/safari-601-branch/Source/WebCore/workers/WorkerGlobalScope.idl	2016-05-12 01:31:26 UTC (rev 200722)
@@ -34,9 +34,9 @@
 ] interface WorkerGlobalScope {
 
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
-    [Replaceable] readonly attribute  WorkerGlobalScope self;
+    readonly attribute  WorkerGlobalScope self;
 #endif
-    [Replaceable] readonly attribute WorkerLocation location;
+    readonly attribute WorkerLocation location;
     void close();
 
     attribute EventHandler onerror;
@@ -46,7 +46,7 @@
     // WorkerUtils
 
     [Custom] void importScripts(/*[Variadic] DOMString urls */);
-    [Replaceable] readonly attribute WorkerNavigator navigator;
+    readonly attribute WorkerNavigator navigator;
 
     // EventTarget interface
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to