Index: src/string.js |
diff --git a/src/string.js b/src/string.js |
index 030d507af3a158453534e26250d55389908b3c24..3da316dd950ff83710d56363314769f54e3497cd 100644 |
--- a/src/string.js |
+++ b/src/string.js |
@@ -29,7 +29,7 @@ function StringConstructor(x) { |
// ECMA-262 section 15.5.4.2 |
function StringToString() { |
if (!IS_STRING(this) && !IS_STRING_WRAPPER(this)) { |
- throw new $TypeError('String.prototype.toString is not generic'); |
+ throw MakeTypeError(kNotGeneric, 'String.prototype.toString'); |
} |
return %_ValueOf(this); |
} |
@@ -38,7 +38,7 @@ function StringToString() { |
// ECMA-262 section 15.5.4.3 |
function StringValueOf() { |
if (!IS_STRING(this) && !IS_STRING_WRAPPER(this)) { |
- throw new $TypeError('String.prototype.valueOf is not generic'); |
+ throw MakeTypeError(kNotGeneric, 'String.prototype.valueOf'); |
} |
return %_ValueOf(this); |
} |