Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1138)

Unified Diff: src/string.js

Issue 1099573002: Migrate error messages, part 4 (v8natives.js). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix wrong assertion Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/proxy.js ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/proxy.js ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698