Changeset 205301 in webkit


Ignore:
Timestamp:
Sep 1, 2016 11:34:12 AM (8 years ago)
Author:
Chris Dumez
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

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205298 r205301  
     12016-09-01  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rolling out r205297.
     4
     5        Caused some JSC test failures
     6
     7        Reverted changeset:
     8
     9        "Align cross-origin proto getter / setter behavior with the
     10        specification"
     11        https://bugs.webkit.org/show_bug.cgi?id=161455
     12        http://trac.webkit.org/changeset/205297
     13
    1142016-09-01  Jiewen Tan  <jiewen_tan@apple.com>
    215
  • trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt

    r205297 r205301  
    1 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.
    2 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.
    31CONSOLE 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.
    42CONSOLE 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.
     
    75PASS: Object.getPrototypeOf(targetWindow) should be 'null' and is.
    86PASS: Object.getPrototypeOf(targetWindow.location) should be 'null' and is.
    9 PASS: protoGetter.call(targetWindow) should be 'null' and is.
    10 PASS: protoGetter.call(targetWindow.location) should be 'null' and is.
    117PASS 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..
    128PASS: successfullyParsed should be 'true' and is.
  • trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html

    r205297 r205301  
    1919            shouldBeNull("Object.getPrototypeOf(targetWindow)");
    2020            shouldBeNull("Object.getPrototypeOf(targetWindow.location)");
    21             protoGetter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').get;
    22             shouldBeNull("protoGetter.call(targetWindow)");
    23             shouldBeNull("protoGetter.call(targetWindow.location)");
    24 
    2521            shouldThrowErrorName("targetWindow.history", "SecurityError");
    2622
  • trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt

    r205297 r205301  
    1 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.
    2 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.
    31CONSOLE 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.
    42CONSOLE 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.
     
    1412PASS Object.setPrototypeOf(targetWindow.location, Array.prototype) threw exception TypeError: Permission denied.
    1513PASS: targetWindow.location instanceof Array should be 'false' and is.
    16 PASS: targetWindow instanceof Array should be 'false' and is.
    17 PASS protoSetter.call(targetWindow, Array.prototype) threw exception TypeError: Permission denied.
    18 PASS: targetWindow instanceof Array should be 'false' and is.
    19 PASS: targetWindow.location instanceof Array should be 'false' and is.
    20 PASS protoSetter.call(targetWindow.location, Array.prototype) threw exception TypeError: Permission denied.
    21 PASS: targetWindow.location instanceof Array should be 'false' and is.
    2214PASS: successfullyParsed should be 'true' and is.
    2315
  • trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf.html

    r205297 r205301  
    2525            shouldBeFalse("targetWindow.location instanceof Array");
    2626
    27             protoSetter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
    28             shouldBeFalse("targetWindow instanceof Array");
    29             shouldThrowErrorName("protoSetter.call(targetWindow, Array.prototype)", "TypeError");
    30             shouldBeFalse("targetWindow instanceof Array");
    31 
    32             shouldBeFalse("targetWindow.location instanceof Array");
    33             shouldThrowErrorName("protoSetter.call(targetWindow.location, Array.prototype)", "TypeError");
    34             shouldBeFalse("targetWindow.location instanceof Array");
    35 
    3627            finishJSTest();
    3728        }
  • trunk/Source/JavaScriptCore/ChangeLog

    r205297 r205301  
     12016-09-01  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rolling out r205297.
     4
     5        Caused some JSC test failures
     6
     7        Reverted changeset:
     8
     9        "Align cross-origin proto getter / setter behavior with the
     10        specification"
     11        https://bugs.webkit.org/show_bug.cgi?id=161455
     12        http://trac.webkit.org/changeset/205297
     13
    1142016-09-01  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp

    r205297 r205301  
    888888        if (m_thisObject->allowsAccessFrom(visitor->callFrame()))
    889889            m_result = JSValue::encode(m_thisObject->getPrototype(m_exec->vm(), m_exec));
    890         else
    891             m_result = JSValue::encode(jsNull());
    892890
    893891        return StackVisitor::Done;
     
    977975        return JSValue::encode(jsUndefined());
    978976
    979     if (!checkProtoSetterAccessAllowed(exec, thisObject)) {
    980         throwTypeError(exec, scope, ASCIILiteral("Permission denied"));
     977    if (!checkProtoSetterAccessAllowed(exec, thisObject))
    981978        return JSValue::encode(jsUndefined());
    982     }
    983979
    984980    // Setting __proto__ to a non-object, non-null value is silently ignored to match Mozilla.
Note: See TracChangeset for help on using the changeset viewer.