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

Unified Diff: src/v8natives.js

Issue 1095573002: Revert of Migrate error messages, part 2. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/typedarray.js ('k') | src/weak-collection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index d050a9e2c479dafdb311a4fd1a4f5e5d4497fe0f..6b0aa2058841ce49215fcc1cb51013cc10227a10 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -691,7 +691,7 @@
var func = obj[p];
if (IS_NULL_OR_UNDEFINED(func)) return UNDEFINED;
if (IS_SPEC_FUNCTION(func)) return func;
- throw MakeTypeError(kCalledNonCallable, typeof func);
+ throw MakeTypeError('called_non_callable', [typeof func]);
}
@@ -1587,8 +1587,8 @@
var x = this;
if (!IS_NUMBER(this)) {
if (!IS_NUMBER_WRAPPER(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- "Number.prototype.toFixed", this);
+ throw MakeTypeError("incompatible_method_receiver",
+ ["Number.prototype.toFixed", this]);
}
// Get the value of this number in case it's an object.
x = %_ValueOf(this);
@@ -1612,8 +1612,8 @@
var x = this;
if (!IS_NUMBER(this)) {
if (!IS_NUMBER_WRAPPER(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- "Number.prototype.toExponential", this);
+ throw MakeTypeError("incompatible_method_receiver",
+ ["Number.prototype.toExponential", this]);
}
// Get the value of this number in case it's an object.
x = %_ValueOf(this);
@@ -1638,8 +1638,8 @@
var x = this;
if (!IS_NUMBER(this)) {
if (!IS_NUMBER_WRAPPER(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- "Number.prototype.toPrecision", this);
+ throw MakeTypeError("incompatible_method_receiver",
+ ["Number.prototype.toPrecision", this]);
}
// Get the value of this number in case it's an object.
x = %_ValueOf(this);
« no previous file with comments | « src/typedarray.js ('k') | src/weak-collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698