Title: [200763] branches/safari-601.1.46-branch

Diff

Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (200762 => 200763)


--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2016-05-12 09:12:33 UTC (rev 200762)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog	2016-05-12 09:12:38 UTC (rev 200763)
@@ -1,5 +1,27 @@
 2016-05-12  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r200375. rdar://problem/26064990
+
+    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-12  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r199101. rdar://problem/26228884
 
     2016-04-06  Zalan Bujtas  <za...@apple.com>

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


--- branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/location-readonly-expected.txt	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/location-readonly-expected.txt	2016-05-12 09:12:38 UTC (rev 200763)
@@ -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.1.46-branch/LayoutTests/http/tests/workers/location-readonly.html (0 => 200763)


--- branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/location-readonly.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/location-readonly.html	2016-05-12 09:12:38 UTC (rev 200763)
@@ -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.1.46-branch/LayoutTests/http/tests/workers/navigator-readonly-expected.txt (0 => 200763)


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

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


--- branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/navigator-readonly.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/navigator-readonly.html	2016-05-12 09:12:38 UTC (rev 200763)
@@ -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.1.46-branch/LayoutTests/http/tests/workers/self-readonly-expected.txt (0 => 200763)


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

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


--- branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/self-readonly.html	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/self-readonly.html	2016-05-12 09:12:38 UTC (rev 200763)
@@ -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.1.46-branch/LayoutTests/http/tests/workers/worker-location.js (0 => 200763)


--- branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/worker-location.js	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/worker-location.js	2016-05-12 09:12:38 UTC (rev 200763)
@@ -0,0 +1,3 @@
+location = {};
+location.hostname = "FAIL";
+postMessage(location.hostname);

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


--- branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/worker-navigator.js	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/worker-navigator.js	2016-05-12 09:12:38 UTC (rev 200763)
@@ -0,0 +1,3 @@
+navigator = {};
+navigator.appName = "FAIL";
+postMessage(navigator.appName);

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


--- branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/worker-self.js	                        (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/http/tests/workers/worker-self.js	2016-05-12 09:12:38 UTC (rev 200763)
@@ -0,0 +1,3 @@
+self = {};
+self.NaN = "100";
+postMessage(self.NaN);

Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (200762 => 200763)


--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2016-05-12 09:12:33 UTC (rev 200762)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2016-05-12 09:12:38 UTC (rev 200763)
@@ -1,5 +1,25 @@
 2016-05-12  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r200375. rdar://problem/26064990
+
+    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-05-12  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r200091. rdar://problem/26228870
 
     2016-04-26  Brent Fulgham  <bfulg...@apple.com>

Modified: branches/safari-601.1.46-branch/Source/WebCore/workers/WorkerGlobalScope.idl (200762 => 200763)


--- branches/safari-601.1.46-branch/Source/WebCore/workers/WorkerGlobalScope.idl	2016-05-12 09:12:33 UTC (rev 200762)
+++ branches/safari-601.1.46-branch/Source/WebCore/workers/WorkerGlobalScope.idl	2016-05-12 09:12:38 UTC (rev 200763)
@@ -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