Title: [201619] trunk
Revision
201619
Author
msab...@apple.com
Date
2016-06-02 15:01:50 -0700 (Thu, 02 Jun 2016)

Log Message

REGRESSION(r200694): %ThrowTypeError% is not unique
https://bugs.webkit.org/show_bug.cgi?id=158231

Reviewed by Joseph Pecoraro.

Source/_javascript_Core:

The ES6 standard in section 9.2.7.1 states that %ThrowTypeError% is unique.  This
change reverts the handling of TypeError before r200694 and then rolls in
throwTypeErrorGetterSetter() with the renamed throwTypeErrorArgumentsCalleeAndCallerGetterSetter().

* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::getOwnPropertySlot):
(JSC::ClonedArguments::materializeSpecials):
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::finishCreation):
(JSC::JSBoundFunction::visitChildren):
* runtime/JSFunction.cpp:
(JSC::getThrowTypeErrorGetterSetter):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::regExpProtoSymbolReplaceFunction):
(JSC::JSGlobalObject::regExpProtoGlobalGetter):
(JSC::JSGlobalObject::regExpProtoUnicodeGetter):
(JSC::JSGlobalObject::throwTypeErrorArgumentsCalleeAndCallerGetterSetter):
(JSC::JSGlobalObject::moduleLoader):
(JSC::JSGlobalObject::throwTypeErrorGetterSetter): Deleted.
(JSC::JSGlobalObject::throwTypeErrorCalleeAndCallerGetterSetter): Deleted.
(JSC::JSGlobalObject::throwTypeErrorArgumentsAndCallerInStrictModeGetterSetter): Deleted.
(JSC::JSGlobalObject::throwTypeErrorArgumentsAndCallerInClassContextGetterSetter): Deleted.
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncThrowTypeError):
(JSC::globalFuncThrowTypeErrorArgumentsCalleeAndCaller):
(JSC::globalFuncThrowTypeErrorCalleeAndCaller): Deleted.
(JSC::globalFuncThrowTypeErrorArgumentsAndCallerInStrictMode): Deleted.
(JSC::globalFuncThrowTypeErrorArgumentsAndCallerInClassContext): Deleted.
* runtime/JSGlobalObjectFunctions.h:
* tests/stress/reflect-set.js:

LayoutTests:

Rebased tests for the new TypeError messages.
Added a new test, throw-type-error-is-unique.html.

* inspector/runtime/getProperties-expected.txt:
* js/basic-strict-mode-expected.txt:
* js/caller-property-expected.txt:
* js/class-method-and-constructor-properties-expected.txt:
* js/script-tests/caller-property.js:
(strictCaller):
(strictTailCaller):
* js/script-tests/class-method-and-constructor-properties.js:
(F.prototype.getElement):
(F):
(G.prototype.get item):
(G):
(H.prototype.arguments):
(H):
* js/script-tests/throw-type-error-is-unique.js: Added.
(ThrowTypeErrorSource):
(ThrowTypeErrorSource.prototype.checkTypeErrorFunctions):
(A):
(strictArguments):
(test):
* js/throw-type-error-is-unique-expected.txt: Added.
* js/throw-type-error-is-unique.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (201618 => 201619)


--- trunk/LayoutTests/ChangeLog	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/LayoutTests/ChangeLog	2016-06-02 22:01:50 UTC (rev 201619)
@@ -1,3 +1,36 @@
+2016-06-02  Michael Saboff  <msab...@apple.com>
+
+        REGRESSION(r200694): %ThrowTypeError% is not unique
+        https://bugs.webkit.org/show_bug.cgi?id=158231
+
+        Reviewed by Joseph Pecoraro.
+
+        Rebased tests for the new TypeError messages.
+        Added a new test, throw-type-error-is-unique.html.
+
+        * inspector/runtime/getProperties-expected.txt:
+        * js/basic-strict-mode-expected.txt:
+        * js/caller-property-expected.txt:
+        * js/class-method-and-constructor-properties-expected.txt:
+        * js/script-tests/caller-property.js:
+        (strictCaller):
+        (strictTailCaller):
+        * js/script-tests/class-method-and-constructor-properties.js:
+        (F.prototype.getElement):
+        (F):
+        (G.prototype.get item):
+        (G):
+        (H.prototype.arguments):
+        (H):
+        * js/script-tests/throw-type-error-is-unique.js: Added.
+        (ThrowTypeErrorSource):
+        (ThrowTypeErrorSource.prototype.checkTypeErrorFunctions):
+        (A):
+        (strictArguments):
+        (test):
+        * js/throw-type-error-is-unique-expected.txt: Added.
+        * js/throw-type-error-is-unique.html: Added.
+
 2016-06-02  Daniel Bates  <daba...@apple.com>
 
         Fix a couple of mistakes in CSSParserValue memory management

Modified: trunk/LayoutTests/inspector/runtime/getProperties-expected.txt (201618 => 201619)


--- trunk/LayoutTests/inspector/runtime/getProperties-expected.txt	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/LayoutTests/inspector/runtime/getProperties-expected.txt	2016-06-02 22:01:50 UTC (rev 201619)
@@ -21,8 +21,8 @@
   __proto__ function function () {
     [native code]
 }
-  arguments object TypeError: Type error
-  caller object TypeError: Type error
+  arguments object TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+  caller object TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
   length number 0
   name string bound Number
 Internal properties:
@@ -38,8 +38,8 @@
   __proto__ function function () {
     [native code]
 }
-  arguments object TypeError: Type error
-  caller object TypeError: Type error
+  arguments object TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+  caller object TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
   length number 0
   name string bound 
 Internal properties:

Modified: trunk/LayoutTests/js/basic-strict-mode-expected.txt (201618 => 201619)


--- trunk/LayoutTests/js/basic-strict-mode-expected.txt	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/LayoutTests/js/basic-strict-mode-expected.txt	2016-06-02 22:01:50 UTC (rev 201619)
@@ -56,18 +56,18 @@
 PASS (function(){(function (){var a; function f() {'use strict'; delete a;} })()}) threw exception SyntaxError: Cannot delete unqualified property 'a' in strict mode..
 PASS (function (){'use strict'; with(1){};}) threw exception SyntaxError: 'with' statements are not valid in strict mode..
 PASS (function(){(function (){'use strict'; with(1){};})}) threw exception SyntaxError: 'with' statements are not valid in strict mode..
-PASS (function (){'use strict'; arguments.callee; })() threw exception TypeError: 'callee' and 'caller' cannot be accessed in strict mode..
-PASS (function (){'use strict'; arguments.caller; })() threw exception TypeError: 'callee' and 'caller' cannot be accessed in strict mode..
-PASS (function f(){'use strict'; f.arguments; })() threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS (function f(){'use strict'; f.caller; })() threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS (function f(){'use strict'; f.arguments=5; })() threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS (function f(){'use strict'; f.caller=5; })() threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS (function (arg){'use strict'; arguments.callee; })() threw exception TypeError: 'callee' and 'caller' cannot be accessed in strict mode..
-PASS (function (arg){'use strict'; arguments.caller; })() threw exception TypeError: 'callee' and 'caller' cannot be accessed in strict mode..
-PASS (function f(arg){'use strict'; f.arguments; })() threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS (function f(arg){'use strict'; f.caller; })() threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS (function f(arg){'use strict'; f.arguments=5; })() threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS (function f(arg){'use strict'; f.caller=5; })() threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS (function (){'use strict'; arguments.callee; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function (){'use strict'; arguments.caller; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function f(){'use strict'; f.arguments; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function f(){'use strict'; f.caller; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function f(){'use strict'; f.arguments=5; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function f(){'use strict'; f.caller=5; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function (arg){'use strict'; arguments.callee; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function (arg){'use strict'; arguments.caller; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function f(arg){'use strict'; f.arguments; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function f(arg){'use strict'; f.caller; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function f(arg){'use strict'; f.arguments=5; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS (function f(arg){'use strict'; f.caller=5; })() threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS "caller" in function(){"use strict"} is true
 PASS (function(){"use strict";}).hasOwnProperty("caller") is true
 PASS "arguments" in function(){"use strict"} is true

Modified: trunk/LayoutTests/js/caller-property-expected.txt (201618 => 201619)


--- trunk/LayoutTests/js/caller-property-expected.txt	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/LayoutTests/js/caller-property-expected.txt	2016-06-02 22:01:50 UTC (rev 201619)
@@ -7,25 +7,25 @@
 PASS childHasCallerWhenCalledWithoutParent is false
 PASS childHasCallerWhenCalledFromWithinParent is true
 PASS nonStrictCaller(nonStrictCallee) is nonStrictCaller
-PASS nonStrictCaller(strictCallee) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS nonStrictCaller(strictCallee) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS strictCaller(nonStrictCallee) threw exception TypeError: Function.caller used to retrieve strict caller.
-PASS strictCaller(strictCallee) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS strictCaller(strictCallee) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS strictTailCaller(nonStrictCallee) is null
-PASS strictTailCaller(strictCallee) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS strictTailCaller(strictCallee) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS nonStrictCaller(boundNonStrictCallee) is nonStrictCaller
-PASS nonStrictCaller(boundStrictCallee) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS nonStrictCaller(boundStrictCallee) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS strictCaller(boundNonStrictCallee) threw exception TypeError: Function.caller used to retrieve strict caller.
-PASS strictCaller(boundStrictCallee) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS strictCaller(boundStrictCallee) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS strictTailCaller(boundNonStrictCallee) is null
-PASS strictTailCaller(boundStrictCallee) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS strictTailCaller(boundStrictCallee) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS nonStrictGetter(nonStrictAccessor) is nonStrictGetter
 PASS nonStrictSetter(nonStrictAccessor) is true
-PASS nonStrictGetter(strictAccessor) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS nonStrictSetter(strictAccessor) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS nonStrictGetter(strictAccessor) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS nonStrictSetter(strictAccessor) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS strictGetter(nonStrictAccessor) threw exception TypeError: Function.caller used to retrieve strict caller.
 PASS strictSetter(nonStrictAccessor) threw exception TypeError: Function.caller used to retrieve strict caller.
-PASS strictGetter(strictAccessor) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
-PASS strictSetter(strictAccessor) threw exception TypeError: 'caller' and 'arguments' cannot be accessed in strict mode..
+PASS strictGetter(strictAccessor) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
+PASS strictSetter(strictAccessor) threw exception TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode..
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/js/class-method-and-constructor-properties-expected.txt (201618 => 201619)


--- trunk/LayoutTests/js/class-method-and-constructor-properties-expected.txt	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/LayoutTests/js/class-method-and-constructor-properties-expected.txt	2016-06-02 22:01:50 UTC (rev 201619)
@@ -3,28 +3,28 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS (new A()).constructor.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new A()).constructor.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new B()).constructor.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new B()).constructor.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new C()).constructor.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new C()).constructor.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new D()).constructor.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new D()).constructor.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new E()).getItem.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new E()).getItem.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new F()).getItem.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new F()).getItem.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new F()).getElement.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new F()).getElement.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
+PASS (new A()).constructor.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new A()).constructor.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new B()).constructor.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new B()).constructor.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new C()).constructor.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new C()).constructor.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new D()).constructor.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new D()).constructor.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new E()).getItem.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new E()).getItem.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new F()).getItem.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new F()).getItem.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new F()).getElement.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new F()).getElement.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
 PASS (new G()).item.caller:::undefined
 PASS (new G()).item.arguments:::undefined
-PASS H.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS H.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
+PASS H.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS H.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
 PASS (new H()).caller():::"value"
 PASS (new H()).arguments():::"value"
-PASS (new H()).caller.caller:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
-PASS (new H()).caller.arguments:::TypeError: 'caller' and 'arguments' cannot be accessed in class context.
+PASS (new H()).caller.caller:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
+PASS (new H()).caller.arguments:::TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.
 PASS successfullyParsed:::true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/js/script-tests/caller-property.js (201618 => 201619)


--- trunk/LayoutTests/js/script-tests/caller-property.js	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/LayoutTests/js/script-tests/caller-property.js	2016-06-02 22:01:50 UTC (rev 201619)
@@ -27,9 +27,9 @@
 function strictCaller(x) { "use strict"; var result = x(); return result; }
 function strictTailCaller(x) { "use strict"; return x(); }
 shouldBe("nonStrictCaller(nonStrictCallee)", "nonStrictCaller");
-shouldThrow("nonStrictCaller(strictCallee)");
-shouldThrow("strictCaller(nonStrictCallee)", '"TypeError: Function.caller used to retrieve strict caller"');
-shouldThrow("strictCaller(strictCallee)");
+shouldThrow("nonStrictCaller(strictCallee)", '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow("strictCaller(nonStrictCallee)");
+shouldThrow("strictCaller(strictCallee)", '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
 shouldBe("strictTailCaller(nonStrictCallee)", "null");
 shouldThrow("strictTailCaller(strictCallee)");
 

Modified: trunk/LayoutTests/js/script-tests/class-method-and-constructor-properties.js (201618 => 201619)


--- trunk/LayoutTests/js/script-tests/class-method-and-constructor-properties.js	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/LayoutTests/js/script-tests/class-method-and-constructor-properties.js	2016-06-02 22:01:50 UTC (rev 201619)
@@ -33,20 +33,20 @@
 class F extends E { getElement() { return 'text'}}
 class G extends E { get item() { return 'text'} }
 
-shouldThrow('(new A()).constructor.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new A()).constructor.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new B()).constructor.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new B()).constructor.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new C()).constructor.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new C()).constructor.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new D()).constructor.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new D()).constructor.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new E()).getItem.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new E()).getItem.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new F()).getItem.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new F()).getItem.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new F()).getElement.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new F()).getElement.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
+shouldThrow('(new A()).constructor.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new A()).constructor.arguments', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new B()).constructor.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new B()).constructor.arguments', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new C()).constructor.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new C()).constructor.arguments', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new D()).constructor.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new D()).constructor.arguments', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new E()).getItem.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new E()).getItem.arguments', '');
+shouldThrow('(new F()).getItem.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new F()).getItem.arguments', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new F()).getElement.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new F()).getElement.arguments', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
 
 shouldBe('(new G()).item.caller', 'undefined');
 shouldBe('(new G()).item.arguments', 'undefined');
@@ -56,14 +56,14 @@
   arguments() { return 'value'; }
 }
 
-shouldThrow('H.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('H.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
+shouldThrow('H.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('H.arguments', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
 
 shouldBe('(new H()).caller()', '"value"');
 shouldBe('(new H()).arguments()', '"value"');
 
-shouldThrow('(new H()).caller.caller', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
-shouldThrow('(new H()).caller.arguments', '"TypeError: \'caller\' and \'arguments\' cannot be accessed in class context."');
+shouldThrow('(new H()).caller.caller', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
+shouldThrow('(new H()).caller.arguments', '"TypeError: \'arguments\', \'callee\', and \'caller\' cannot be accessed in strict mode."');
 
 
 var successfullyParsed = true;

Added: trunk/LayoutTests/js/script-tests/throw-type-error-is-unique.js (0 => 201619)


--- trunk/LayoutTests/js/script-tests/throw-type-error-is-unique.js	                        (rev 0)
+++ trunk/LayoutTests/js/script-tests/throw-type-error-is-unique.js	2016-06-02 22:01:50 UTC (rev 201619)
@@ -0,0 +1,68 @@
+"use strict";
+
+description('Tests ES6 %ThrowTypeError% intrinsic is unique');
+
+class ThrowTypeErrorSource {
+    constructor(context, base, names)
+    {
+        this.context = context;
+        this.base = base;
+        this.names = names;
+    }
+
+    checkTypeErrorFunctions(throwTypeErrorFunction)
+    {
+        let errors = 0;
+        for (let name of this.names) {
+            let desc = Object.getOwnPropertyDescriptor(this.base, name);
+
+            if (!desc)
+                return 0;
+
+            for (let accessorType of ["get", "set"]) {
+                let accessor = desc[accessorType];
+                if (accessor && accessor !== throwTypeErrorFunction) {
+                    testFailed(this.context + " " + accessorType + "ter for \"" + name + "\" is not the same %ThrowTypeError% intrinsic");
+                    errors++;
+                }
+            }
+        }
+
+        return errors;
+    }
+}
+
+class A { };
+let arrayProtoPush = Array.prototype.push;
+
+function strictArguments()
+{
+    return arguments;
+}
+
+let sloppyArguments = Function("return arguments;");
+
+function test()
+{
+    let baseThrowTypeErrorFunction = Object.getOwnPropertyDescriptor(arguments, "caller").get;
+
+    let sources = [
+        new ThrowTypeErrorSource("Function.prototype", Function.prototype, ["arguments", "caller"]),
+        new ThrowTypeErrorSource("Array.prototype.push (builtin)", arrayProtoPush, ["arguments", "caller"]),
+        new ThrowTypeErrorSource("Strict function arguments", strictArguments, ["arguments", "caller"]),
+        new ThrowTypeErrorSource("Sloppy function arguments", sloppyArguments, ["arguments", "caller"]),
+        new ThrowTypeErrorSource("Strict arguments", strictArguments(), ["callee", "caller"]),
+        new ThrowTypeErrorSource("Sloppy arguments", sloppyArguments(), ["callee", "caller"]),
+        new ThrowTypeErrorSource("Class constructor", (new A()).constructor, ["arguments", "caller"])
+    ];
+
+    let errors = 0;
+
+    for (let source of sources)
+        errors += source.checkTypeErrorFunctions(baseThrowTypeErrorFunction);
+
+    if (!errors)
+        testPassed("%ThrowTypeError% intrinsic is unique");
+}
+
+test();

Added: trunk/LayoutTests/js/throw-type-error-is-unique-expected.txt (0 => 201619)


--- trunk/LayoutTests/js/throw-type-error-is-unique-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/js/throw-type-error-is-unique-expected.txt	2016-06-02 22:01:50 UTC (rev 201619)
@@ -0,0 +1,10 @@
+Tests ES6 %ThrowTypeError% intrinsic is unique
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS %ThrowTypeError% intrinsic is unique
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/js/throw-type-error-is-unique.html (0 => 201619)


--- trunk/LayoutTests/js/throw-type-error-is-unique.html	                        (rev 0)
+++ trunk/LayoutTests/js/throw-type-error-is-unique.html	2016-06-02 22:01:50 UTC (rev 201619)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>

Modified: trunk/Source/_javascript_Core/ChangeLog (201618 => 201619)


--- trunk/Source/_javascript_Core/ChangeLog	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-06-02 22:01:50 UTC (rev 201619)
@@ -1,5 +1,48 @@
 2016-06-02  Michael Saboff  <msab...@apple.com>
 
+        REGRESSION(r200694): %ThrowTypeError% is not unique
+        https://bugs.webkit.org/show_bug.cgi?id=158231
+
+        Reviewed by Joseph Pecoraro.
+
+        The ES6 standard in section 9.2.7.1 states that %ThrowTypeError% is unique.  This
+        change reverts the handling of TypeError before r200694 and then rolls in
+        throwTypeErrorGetterSetter() with the renamed throwTypeErrorArgumentsCalleeAndCallerGetterSetter().
+
+        * runtime/ClonedArguments.cpp:
+        (JSC::ClonedArguments::getOwnPropertySlot):
+        (JSC::ClonedArguments::materializeSpecials):
+        * runtime/JSBoundFunction.cpp:
+        (JSC::JSBoundFunction::finishCreation):
+        (JSC::JSBoundFunction::visitChildren):
+        * runtime/JSFunction.cpp:
+        (JSC::getThrowTypeErrorGetterSetter):
+        (JSC::JSFunction::callerGetter):
+        (JSC::JSFunction::defineOwnProperty):
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init):
+        (JSC::JSGlobalObject::visitChildren):
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::regExpProtoSymbolReplaceFunction):
+        (JSC::JSGlobalObject::regExpProtoGlobalGetter):
+        (JSC::JSGlobalObject::regExpProtoUnicodeGetter):
+        (JSC::JSGlobalObject::throwTypeErrorArgumentsCalleeAndCallerGetterSetter):
+        (JSC::JSGlobalObject::moduleLoader):
+        (JSC::JSGlobalObject::throwTypeErrorGetterSetter): Deleted.
+        (JSC::JSGlobalObject::throwTypeErrorCalleeAndCallerGetterSetter): Deleted.
+        (JSC::JSGlobalObject::throwTypeErrorArgumentsAndCallerInStrictModeGetterSetter): Deleted.
+        (JSC::JSGlobalObject::throwTypeErrorArgumentsAndCallerInClassContextGetterSetter): Deleted.
+        * runtime/JSGlobalObjectFunctions.cpp:
+        (JSC::globalFuncThrowTypeError):
+        (JSC::globalFuncThrowTypeErrorArgumentsCalleeAndCaller):
+        (JSC::globalFuncThrowTypeErrorCalleeAndCaller): Deleted.
+        (JSC::globalFuncThrowTypeErrorArgumentsAndCallerInStrictMode): Deleted.
+        (JSC::globalFuncThrowTypeErrorArgumentsAndCallerInClassContext): Deleted.
+        * runtime/JSGlobalObjectFunctions.h:
+        * tests/stress/reflect-set.js:
+
+2016-06-02  Michael Saboff  <msab...@apple.com>
+
         [iOS]: Some JSC stress tests fail running out of executable memory when the LLInt is disabled
         https://bugs.webkit.org/show_bug.cgi?id=158317
 

Modified: trunk/Source/_javascript_Core/runtime/ClonedArguments.cpp (201618 => 201619)


--- trunk/Source/_javascript_Core/runtime/ClonedArguments.cpp	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/runtime/ClonedArguments.cpp	2016-06-02 22:01:50 UTC (rev 201619)
@@ -158,11 +158,11 @@
 
         if (isStrictMode) {
             if (ident == vm.propertyNames->callee) {
-                slot.setGetterSlot(thisObject, DontDelete | DontEnum | Accessor, thisObject->globalObject()->throwTypeErrorCalleeAndCallerGetterSetter());
+                slot.setGetterSlot(thisObject, DontDelete | DontEnum | Accessor, thisObject->globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter());
                 return true;
             }
             if (ident == vm.propertyNames->caller) {
-                slot.setGetterSlot(thisObject, DontDelete | DontEnum | Accessor, thisObject->globalObject()->throwTypeErrorCalleeAndCallerGetterSetter());
+                slot.setGetterSlot(thisObject, DontDelete | DontEnum | Accessor, thisObject->globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter());
                 return true;
             }
 
@@ -238,8 +238,8 @@
     bool isStrictMode = executable->isStrictMode();
     
     if (isStrictMode) {
-        putDirectAccessor(exec, vm.propertyNames->callee, globalObject()->throwTypeErrorCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
-        putDirectAccessor(exec, vm.propertyNames->caller, globalObject()->throwTypeErrorCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
+        putDirectAccessor(exec, vm.propertyNames->callee, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
+        putDirectAccessor(exec, vm.propertyNames->caller, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
     } else
         putDirect(vm, vm.propertyNames->callee, JSValue(m_callee.get()));
 

Modified: trunk/Source/_javascript_Core/runtime/JSBoundFunction.cpp (201618 => 201619)


--- trunk/Source/_javascript_Core/runtime/JSBoundFunction.cpp	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/runtime/JSBoundFunction.cpp	2016-06-02 22:01:50 UTC (rev 201619)
@@ -196,8 +196,8 @@
     Base::finishCreation(vm, executable, length, name);
     ASSERT(inherits(info()));
 
-    putDirectNonIndexAccessor(vm, vm.propertyNames->arguments, globalObject()->throwTypeErrorGetterSetter(), DontDelete | DontEnum | Accessor);
-    putDirectNonIndexAccessor(vm, vm.propertyNames->caller, globalObject()->throwTypeErrorGetterSetter(), DontDelete | DontEnum | Accessor);
+    putDirectNonIndexAccessor(vm, vm.propertyNames->arguments, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
+    putDirectNonIndexAccessor(vm, vm.propertyNames->caller, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
 }
 
 void JSBoundFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)

Modified: trunk/Source/_javascript_Core/runtime/JSFunction.cpp (201618 => 201619)


--- trunk/Source/_javascript_Core/runtime/JSFunction.cpp	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/runtime/JSFunction.cpp	2016-06-02 22:01:50 UTC (rev 201619)
@@ -319,13 +319,6 @@
     return functor.result();
 }
 
-static GetterSetter* getThrowTypeErrorGetterSetter(JSFunction* function)
-{
-    return function->jsExecutable()->isClassConstructorFunction() || function->jsExecutable()->parseMode() == SourceParseMode::MethodMode
-        ? function->globalObject()->throwTypeErrorArgumentsAndCallerInClassContextGetterSetter()
-        : function->globalObject()->throwTypeErrorArgumentsAndCallerInStrictModeGetterSetter();
-}
-
 EncodedJSValue JSFunction::callerGetter(ExecState* exec, EncodedJSValue thisValue, PropertyName, JSObject*)
 {
     JSFunction* thisObj = jsCast<JSFunction*>(JSValue::decode(thisValue));
@@ -375,7 +368,7 @@
         if (thisObject->jsExecutable()->isStrictMode() || thisObject->jsExecutable()->isClassConstructorFunction()) {
             bool result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
             if (!result) {
-                GetterSetter* errorGetterSetter = getThrowTypeErrorGetterSetter(thisObject);
+                GetterSetter* errorGetterSetter = thisObject->globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter();
                 thisObject->putDirectAccessor(exec, propertyName, errorGetterSetter, DontDelete | DontEnum | Accessor);
                 result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
                 ASSERT(result);
@@ -390,7 +383,7 @@
         if (thisObject->jsExecutable()->isStrictMode() || thisObject->jsExecutable()->isClassConstructorFunction()) {
             bool result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
             if (!result) {
-                GetterSetter* errorGetterSetter = getThrowTypeErrorGetterSetter(thisObject);
+                GetterSetter* errorGetterSetter = thisObject->globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter();
                 thisObject->putDirectAccessor(exec, propertyName, errorGetterSetter, DontDelete | DontEnum | Accessor);
                 result = Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
                 ASSERT(result);
@@ -499,7 +492,7 @@
         if (thisObject->jsExecutable()->isStrictMode()) {
             PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
             if (!Base::getOwnPropertySlot(thisObject, exec, propertyName, slot))
-                thisObject->putDirectAccessor(exec, propertyName, getThrowTypeErrorGetterSetter(thisObject), DontDelete | DontEnum | Accessor);
+                thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
             return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
         }
         valueCheck = !descriptor.value() || sameValue(exec, descriptor.value(), retrieveArguments(exec, thisObject));
@@ -507,7 +500,7 @@
         if (thisObject->jsExecutable()->isStrictMode()) {
             PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
             if (!Base::getOwnPropertySlot(thisObject, exec, propertyName, slot))
-                thisObject->putDirectAccessor(exec, propertyName, getThrowTypeErrorGetterSetter(thisObject), DontDelete | DontEnum | Accessor);
+                thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
             return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
         }
         valueCheck = !descriptor.value() || sameValue(exec, descriptor.value(), retrieveCallerFunction(exec, thisObject));

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (201618 => 201619)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2016-06-02 22:01:50 UTC (rev 201619)
@@ -384,30 +384,14 @@
             getterSetter->setSetter(init.vm, init.owner, thrower);
             init.set(getterSetter);
         });
-    m_throwTypeErrorCalleeAndCallerGetterSetter.initLater(
+    m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter.initLater(
         [] (const Initializer<GetterSetter>& init) {
-            JSFunction* thrower = JSFunction::create(init.vm, init.owner, 0, String(), globalFuncThrowTypeErrorCalleeAndCaller);
+            JSFunction* thrower = JSFunction::create(init.vm, init.owner, 0, String(), globalFuncThrowTypeErrorArgumentsCalleeAndCaller);
             GetterSetter* getterSetter = GetterSetter::create(init.vm, init.owner);
             getterSetter->setGetter(init.vm, init.owner, thrower);
             getterSetter->setSetter(init.vm, init.owner, thrower);
             init.set(getterSetter);
         });
-    m_throwTypeErrorArgumentsAndCallerInStrictModeGetterSetter.initLater(
-        [] (const Initializer<GetterSetter>& init) {
-            JSFunction* thrower = JSFunction::create(init.vm, init.owner, 0, String(), globalFuncThrowTypeErrorArgumentsAndCallerInStrictMode);
-            GetterSetter* getterSetter = GetterSetter::create(init.vm, init.owner);
-            getterSetter->setGetter(init.vm, init.owner, thrower);
-            getterSetter->setSetter(init.vm, init.owner, thrower);
-            init.set(getterSetter);
-        });
-    m_throwTypeErrorArgumentsAndCallerInClassContextGetterSetter.initLater(
-        [] (const Initializer<GetterSetter>& init) {
-            JSFunction* thrower = JSFunction::create(init.vm, init.owner, 0, String(), globalFuncThrowTypeErrorArgumentsAndCallerInClassContext);
-            GetterSetter* getterSetter = GetterSetter::create(init.vm, init.owner);
-            getterSetter->setGetter(init.vm, init.owner, thrower);
-            getterSetter->setSetter(init.vm, init.owner, thrower);
-            init.set(getterSetter);
-        });
     m_nullGetterFunction.set(vm, this, NullGetterFunction::create(vm, NullGetterFunction::createStructure(vm, this, m_functionPrototype.get())));
     m_nullSetterFunction.set(vm, this, NullSetterFunction::create(vm, NullSetterFunction::createStructure(vm, this, m_functionPrototype.get())));
     m_objectPrototype.set(vm, this, ObjectPrototype::create(vm, this, ObjectPrototype::createStructure(vm, this, jsNull())));
@@ -1074,9 +1058,7 @@
     visitor.append(&thisObject->m_newPromiseCapabilityFunction);
     visitor.append(&thisObject->m_functionProtoHasInstanceSymbolFunction);
     thisObject->m_throwTypeErrorGetterSetter.visit(visitor);
-    thisObject->m_throwTypeErrorCalleeAndCallerGetterSetter.visit(visitor);
-    thisObject->m_throwTypeErrorArgumentsAndCallerInStrictModeGetterSetter.visit(visitor);
-    thisObject->m_throwTypeErrorArgumentsAndCallerInClassContextGetterSetter.visit(visitor);
+    thisObject->m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter.visit(visitor);
     visitor.append(&thisObject->m_moduleLoader);
 
     visitor.append(&thisObject->m_objectPrototype);

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.h (201618 => 201619)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.h	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.h	2016-06-02 22:01:50 UTC (rev 201619)
@@ -242,14 +242,12 @@
     LazyProperty<JSGlobalObject, JSFunction> m_initializePromiseFunction;
     WriteBarrier<JSFunction> m_newPromiseCapabilityFunction;
     WriteBarrier<JSFunction> m_functionProtoHasInstanceSymbolFunction;
+    LazyProperty<JSGlobalObject, GetterSetter> m_throwTypeErrorGetterSetter;
     WriteBarrier<JSObject> m_regExpProtoExec;
     WriteBarrier<JSObject> m_regExpProtoSymbolReplace;
     WriteBarrier<JSObject> m_regExpProtoGlobalGetter;
     WriteBarrier<JSObject> m_regExpProtoUnicodeGetter;
-    LazyProperty<JSGlobalObject, GetterSetter> m_throwTypeErrorGetterSetter;
-    LazyProperty<JSGlobalObject, GetterSetter> m_throwTypeErrorCalleeAndCallerGetterSetter;
-    LazyProperty<JSGlobalObject, GetterSetter> m_throwTypeErrorArgumentsAndCallerInStrictModeGetterSetter;
-    LazyProperty<JSGlobalObject, GetterSetter> m_throwTypeErrorArgumentsAndCallerInClassContextGetterSetter;
+    LazyProperty<JSGlobalObject, GetterSetter> m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter;
 
     WriteBarrier<ModuleLoaderObject> m_moduleLoader;
 
@@ -490,11 +488,10 @@
     JSObject* regExpProtoSymbolReplaceFunction() const { return m_regExpProtoSymbolReplace.get(); }
     JSObject* regExpProtoGlobalGetter() const { return m_regExpProtoGlobalGetter.get(); }
     JSObject* regExpProtoUnicodeGetter() const { return m_regExpProtoUnicodeGetter.get(); }
-
-    GetterSetter* throwTypeErrorGetterSetter() { return m_throwTypeErrorGetterSetter.get(this); }
-    GetterSetter* throwTypeErrorCalleeAndCallerGetterSetter() { return m_throwTypeErrorCalleeAndCallerGetterSetter.get(this); }
-    GetterSetter* throwTypeErrorArgumentsAndCallerInStrictModeGetterSetter() { return m_throwTypeErrorArgumentsAndCallerInStrictModeGetterSetter.get(this); }
-    GetterSetter* throwTypeErrorArgumentsAndCallerInClassContextGetterSetter() { return m_throwTypeErrorArgumentsAndCallerInClassContextGetterSetter.get(this); }
+    GetterSetter* throwTypeErrorArgumentsCalleeAndCallerGetterSetter()
+    {
+        return m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter.get(this);
+    }
     
     ModuleLoaderObject* moduleLoader() const { return m_moduleLoader.get(); }
 

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp (201618 => 201619)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.cpp	2016-06-02 22:01:50 UTC (rev 201619)
@@ -781,22 +781,12 @@
 {
     return throwVMTypeError(exec);
 }
-
-EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorCalleeAndCaller(ExecState* exec)
+    
+EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorArgumentsCalleeAndCaller(ExecState* exec)
 {
-    return throwVMTypeError(exec, "'callee' and 'caller' cannot be accessed in strict mode.");
+    return throwVMTypeError(exec, "'arguments', 'callee', and 'caller' cannot be accessed in strict mode.");
 }
 
-EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorArgumentsAndCallerInStrictMode(ExecState* exec)
-{
-    return throwVMTypeError(exec, "'caller' and 'arguments' cannot be accessed in strict mode.");
-}
-
-EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorArgumentsAndCallerInClassContext(ExecState* exec)
-{
-    return throwVMTypeError(exec, "'caller' and 'arguments' cannot be accessed in class context.");
-}
-
 class GlobalFuncProtoGetterFunctor {
 public:
     GlobalFuncProtoGetterFunctor(ExecState* exec, JSObject* thisObject)

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.h (201618 => 201619)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.h	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObjectFunctions.h	2016-06-02 22:01:50 UTC (rev 201619)
@@ -49,9 +49,7 @@
 EncodedJSValue JSC_HOST_CALL globalFuncEscape(ExecState*);
 EncodedJSValue JSC_HOST_CALL globalFuncUnescape(ExecState*);
 EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeError(ExecState*);
-EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorCalleeAndCaller(ExecState*);
-EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorArgumentsAndCallerInStrictMode(ExecState*);
-EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorArgumentsAndCallerInClassContext(ExecState*);
+EncodedJSValue JSC_HOST_CALL globalFuncThrowTypeErrorArgumentsCalleeAndCaller(ExecState*);
 EncodedJSValue JSC_HOST_CALL globalFuncProtoGetter(ExecState*);
 EncodedJSValue JSC_HOST_CALL globalFuncProtoSetter(ExecState*);
 EncodedJSValue JSC_HOST_CALL globalFuncBuiltinLog(ExecState*);

Modified: trunk/Source/_javascript_Core/tests/stress/reflect-set.js (201618 => 201619)


--- trunk/Source/_javascript_Core/tests/stress/reflect-set.js	2016-06-02 21:53:55 UTC (rev 201618)
+++ trunk/Source/_javascript_Core/tests/stress/reflect-set.js	2016-06-02 22:01:50 UTC (rev 201619)
@@ -877,10 +877,10 @@
 
         shouldThrow(() => {
             Reflect.set(object, 'callee', 'Cappuccino');
-        }, `TypeError: 'callee' and 'caller' cannot be accessed in strict mode.`);
+        }, `TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.`);
         shouldThrow(() => {
             Reflect.get(object, 'callee');
-        }, `TypeError: 'callee' and 'caller' cannot be accessed in strict mode.`);
+        }, `TypeError: 'arguments', 'callee', and 'caller' cannot be accessed in strict mode.`);
     }
 
     function test4() {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to