| Index: src/messages.js
|
| diff --git a/src/messages.js b/src/messages.js
|
| index e641133dda585fe2071c176664ba7bc77202200c..5c722d60666a739b02eeb0ae96b7344c1e1d987b 100644
|
| --- a/src/messages.js
|
| +++ b/src/messages.js
|
| @@ -210,7 +210,7 @@ function FormatMessage(message) {
|
| "no_input_to_regexp", ["No input to ", "%0"],
|
| "invalid_json", ["String '", "%0", "' is not valid JSON"],
|
| "circular_structure", ["Converting circular structure to JSON"],
|
| - "obj_ctor_property_non_object", ["Object.", "%0", " called on non-object"],
|
| + "called_on_non_object", ["%0", " called on non-object"],
|
| "called_on_null_or_undefined", ["%0", " called on null or undefined"],
|
| "array_indexof_not_defined", ["Array.getIndexOf: Argument undefined"],
|
| "object_not_extensible", ["Can't add property ", "%0", ", object is not extensible"],
|
| @@ -1190,9 +1190,8 @@ function ErrorToStringDetectCycle(error) {
|
| }
|
|
|
| function ErrorToString() {
|
| - if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
|
| - throw MakeTypeError("called_on_null_or_undefined",
|
| - ["Error.prototype.toString"]);
|
| + if (!IS_SPEC_OBJECT(this)) {
|
| + throw MakeTypeError("called_on_non_object", ["Error.prototype.toString"]);
|
| }
|
|
|
| try {
|
|
|