Improve Symbol() to string coercion error message
https://bugs.webkit.org/show_bug.cgi?id=157317
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
Improve error messages related to Symbols.
* runtime/JSCJSValue.cpp:
(JSC::JSValue::toStringSlowCase):
* runtime/Symbol.cpp:
(JSC::Symbol::toNumber):
* runtime/SymbolConstructor.cpp:
(JSC::symbolConstructorKeyFor):
* runtime/SymbolPrototype.cpp:
(JSC::symbolProtoFuncToString):
(JSC::symbolProtoFuncValueOf):
* tests/stress/dfg-to-primitive-pass-symbol.js:
* tests/stress/floating-point-div-to-mul.js:
(i.catch):
* tests/stress/string-from-code-point.js:
(shouldThrow):
(string_appeared_here.shouldThrow):
* tests/stress/symbol-error-messages.js: Added.
(shouldThrow):
* tests/stress/symbol-registry.js:
LayoutTests:
* js/math-clz32-expected.txt:
* js/script-tests/symbol-abstract-relational-comparison.js:
(relationalOperators.forEach):
* js/script-tests/symbol-object.js:
* js/script-tests/symbol-prototype-is-ordinary-object.js:
* js/script-tests/symbol-tostring.js:
* js/string-code-point-at-expected.txt:
* js/symbol-abstract-relational-comparison-expected.txt:
* js/symbol-object-expected.txt:
* js/symbol-prototype-is-ordinary-object-expected.txt:
* js/symbol-tostring-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed