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

Unified Diff: src/runtime.js

Issue 1083083004: Reland "Migrate error messages, part 2." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for layout test 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/regexp.js ('k') | src/runtime/runtime-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.js
diff --git a/src/runtime.js b/src/runtime.js
index e4cb4ff312a86f8e09e757ec4114d2a9f7b48d49..b20639cde61d2d7a204abaceab06dea87a8b448b 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -379,7 +379,7 @@ function CALL_NON_FUNCTION() {
if (!IS_FUNCTION(delegate)) {
var callsite = %RenderCallSite();
if (callsite == "") callsite = typeof this;
- throw %MakeTypeError('called_non_callable', [callsite]);
+ throw %MakeTypeError(kCalledNonCallable, callsite);
}
return %Apply(delegate, this, arguments, 0, %_ArgumentsLength());
}
@@ -390,7 +390,7 @@ function CALL_NON_FUNCTION_AS_CONSTRUCTOR() {
if (!IS_FUNCTION(delegate)) {
var callsite = %RenderCallSite();
if (callsite == "") callsite = typeof this;
- throw %MakeTypeError('called_non_callable', [callsite]);
+ throw %MakeTypeError(kCalledNonCallable, callsite);
}
return %Apply(delegate, this, arguments, 0, %_ArgumentsLength());
}
@@ -463,7 +463,7 @@ function REFLECT_APPLY_PREPARE(args) {
}
if (!IS_SPEC_FUNCTION(this)) {
- throw %MakeTypeError('called_non_callable', [ %ToString(this) ]);
+ throw %MakeTypeError(kCalledNonCallable, %ToString(this));
}
if (!IS_SPEC_OBJECT(args)) {
@@ -503,7 +503,7 @@ function REFLECT_CONSTRUCT_PREPARE(args, newTarget) {
if (!ctorOk) {
if (!IS_SPEC_FUNCTION(this)) {
- throw %MakeTypeError('called_non_callable', [ %ToString(this) ]);
+ throw %MakeTypeError(kCalledNonCallable, %ToString(this));
} else {
throw %MakeTypeError('not_constructor', [ %ToString(this) ]);
}
@@ -511,7 +511,7 @@ function REFLECT_CONSTRUCT_PREPARE(args, newTarget) {
if (!newTargetOk) {
if (!IS_SPEC_FUNCTION(newTarget)) {
- throw %MakeTypeError('called_non_callable', [ %ToString(newTarget) ]);
+ throw %MakeTypeError(kCalledNonCallable, %ToString(newTarget));
} else {
throw %MakeTypeError('not_constructor', [ %ToString(newTarget) ]);
}
« no previous file with comments | « src/regexp.js ('k') | src/runtime/runtime-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698