test262: test262/test/built-ins/isNaN/toprimitive-not-callable-throws.js
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Apr 2017 20:20:11 +0000 (20:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Apr 2017 20:20:11 +0000 (20:20 +0000)
commitdfd5c9f74e6f64f3ac37db70936ea2c52cb182a3
tree280967138cb5772c8e97da5afb97766a15c72b64
parentd15053d2fcbbd965e23cd9fcf4e66fa25c5152e2
test262: test262/test/built-ins/isNaN/toprimitive-not-callable-throws.js
https://bugs.webkit.org/show_bug.cgi?id=170888

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-16
Reviewed by Saam Barati.

JSTests:

* stress/computed-accessor.js:
* stress/eval-in-arrow-function.js:
* stress/rest-elements.js:
* stress/string-object-define-own-property.js:
Remove unused shouldThrow.

* stress/symbol-toprimitive-errors.js: Added.
Check for ToPrimitive TypeErrors.

* test262.yaml:

Source/JavaScriptCore:

* runtime/ExceptionHelpers.h:
* runtime/ExceptionHelpers.cpp:
(JSC::createInvalidInstanceofParameterErrorHasInstanceValueNotFunction):
Fix up this function name.

* runtime/JSObject.cpp:
(JSC::callToPrimitiveFunction):
When called with @@isPrimitive, bail on undefined or null and
throw a type error if the value is not callable.

(JSC::JSObject::toPrimitive):
Use throw scope to check for exception.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/computed-accessor.js
JSTests/stress/eval-in-arrow-function.js
JSTests/stress/rest-elements.js
JSTests/stress/string-object-define-own-property.js
JSTests/stress/symbol-toprimitive-errors.js [new file with mode: 0644]
JSTests/test262.yaml
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
Source/JavaScriptCore/runtime/ExceptionHelpers.h
Source/JavaScriptCore/runtime/JSObject.cpp