Title: [205301] trunk
Revision
205301
Author
[email protected]
Date
2016-09-01 11:34:12 -0700 (Thu, 01 Sep 2016)

Log Message

Unreviewed, rolling out r205297.

Caused some JSC test failures

Reverted changeset:

"Align cross-origin proto getter / setter behavior with the
specification"
https://bugs.webkit.org/show_bug.cgi?id=161455
http://trac.webkit.org/changeset/205297

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (205300 => 205301)


--- trunk/LayoutTests/ChangeLog	2016-09-01 18:19:34 UTC (rev 205300)
+++ trunk/LayoutTests/ChangeLog	2016-09-01 18:34:12 UTC (rev 205301)
@@ -1,3 +1,16 @@
+2016-09-01  Chris Dumez  <[email protected]>
+
+        Unreviewed, rolling out r205297.
+
+        Caused some JSC test failures
+
+        Reverted changeset:
+
+        "Align cross-origin proto getter / setter behavior with the
+        specification"
+        https://bugs.webkit.org/show_bug.cgi?id=161455
+        http://trac.webkit.org/changeset/205297
+
 2016-09-01  Jiewen Tan  <[email protected]>
 
         Unreviewed, update iOS simulator WK1 flaky tests.

Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt (205300 => 205301)


--- trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt	2016-09-01 18:19:34 UTC (rev 205300)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt	2016-09-01 18:34:12 UTC (rev 205301)
@@ -1,13 +1,9 @@
 CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
 CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
 This tests that you can't get the prototype of the window or history objects cross-origin using Object.getPrototypeOf().
 
 PASS: Object.getPrototypeOf(targetWindow) should be 'null' and is.
 PASS: Object.getPrototypeOf(targetWindow.location) should be 'null' and is.
-PASS: protoGetter.call(targetWindow) should be 'null' and is.
-PASS: protoGetter.call(targetWindow.location) should be 'null' and is.
 PASS targetWindow.history threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
 PASS: successfullyParsed should be 'true' and is.
 

Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html (205300 => 205301)


--- trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html	2016-09-01 18:19:34 UTC (rev 205300)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html	2016-09-01 18:34:12 UTC (rev 205301)
@@ -18,10 +18,6 @@
 
             shouldBeNull("Object.getPrototypeOf(targetWindow)");
             shouldBeNull("Object.getPrototypeOf(targetWindow.location)");
-            protoGetter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').get;
-            shouldBeNull("protoGetter.call(targetWindow)");
-            shouldBeNull("protoGetter.call(targetWindow.location)");
-
             shouldThrowErrorName("targetWindow.history", "SecurityError");
 
             finishJSTest();

Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt (205300 => 205301)


--- trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt	2016-09-01 18:19:34 UTC (rev 205300)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt	2016-09-01 18:34:12 UTC (rev 205301)
@@ -1,7 +1,5 @@
 CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
 CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
 This tests that you can't set the prototype of the window or location objects cross-origin using Object.setPrototypeOf()
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
@@ -13,12 +11,6 @@
 PASS: targetWindow.location instanceof Array should be 'false' and is.
 PASS Object.setPrototypeOf(targetWindow.location, Array.prototype) threw exception TypeError: Permission denied.
 PASS: targetWindow.location instanceof Array should be 'false' and is.
-PASS: targetWindow instanceof Array should be 'false' and is.
-PASS protoSetter.call(targetWindow, Array.prototype) threw exception TypeError: Permission denied.
-PASS: targetWindow instanceof Array should be 'false' and is.
-PASS: targetWindow.location instanceof Array should be 'false' and is.
-PASS protoSetter.call(targetWindow.location, Array.prototype) threw exception TypeError: Permission denied.
-PASS: targetWindow.location instanceof Array should be 'false' and is.
 PASS: successfullyParsed should be 'true' and is.
 
 TEST COMPLETE

Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf.html (205300 => 205301)


--- trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf.html	2016-09-01 18:19:34 UTC (rev 205300)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf.html	2016-09-01 18:34:12 UTC (rev 205301)
@@ -24,15 +24,6 @@
             shouldThrowErrorName("Object.setPrototypeOf(targetWindow.location, Array.prototype)", "TypeError");
             shouldBeFalse("targetWindow.location instanceof Array");
 
-            protoSetter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
-            shouldBeFalse("targetWindow instanceof Array");
-            shouldThrowErrorName("protoSetter.call(targetWindow, Array.prototype)", "TypeError");
-            shouldBeFalse("targetWindow instanceof Array");
-
-            shouldBeFalse("targetWindow.location instanceof Array");
-            shouldThrowErrorName("protoSetter.call(targetWindow.location, Array.prototype)", "TypeError");
-            shouldBeFalse("targetWindow.location instanceof Array");
-
             finishJSTest();
         }
     </script>

Modified: trunk/Source/_javascript_Core/ChangeLog (205300 => 205301)


--- trunk/Source/_javascript_Core/ChangeLog	2016-09-01 18:19:34 UTC (rev 205300)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-09-01 18:34:12 UTC (rev 205301)
@@ -1,5 +1,18 @@
 2016-09-01  Chris Dumez  <[email protected]>
 
+        Unreviewed, rolling out r205297.
+
+        Caused some JSC test failures
+
+        Reverted changeset:
+
+        "Align cross-origin proto getter / setter behavior with the
+        specification"
+        https://bugs.webkit.org/show_bug.cgi?id=161455
+        http://trac.webkit.org/changeset/205297
+
+2016-09-01  Chris Dumez  <[email protected]>
+
         Align cross-origin proto getter / setter behavior with the specification
         https://bugs.webkit.org/show_bug.cgi?id=161455
 

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp (205300 => 205301)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp	2016-09-01 18:19:34 UTC (rev 205300)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp	2016-09-01 18:34:12 UTC (rev 205301)
@@ -887,8 +887,6 @@
 
         if (m_thisObject->allowsAccessFrom(visitor->callFrame()))
             m_result = JSValue::encode(m_thisObject->getPrototype(m_exec->vm(), m_exec));
-        else
-            m_result = JSValue::encode(jsNull());
 
         return StackVisitor::Done;
     }
@@ -976,10 +974,8 @@
     if (!thisObject)
         return JSValue::encode(jsUndefined());
 
-    if (!checkProtoSetterAccessAllowed(exec, thisObject)) {
-        throwTypeError(exec, scope, ASCIILiteral("Permission denied"));
+    if (!checkProtoSetterAccessAllowed(exec, thisObject))
         return JSValue::encode(jsUndefined());
-    }
 
     // Setting __proto__ to a non-object, non-null value is silently ignored to match Mozilla.
     if (!value.isObject() && !value.isNull())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to