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

Unified Diff: src/js/v8natives.js

Issue 2222893002: Move family of MakeError functions to C++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix in prologue.js Created 4 years, 4 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
Index: src/js/v8natives.js
diff --git a/src/js/v8natives.js b/src/js/v8natives.js
index 4e7d53664564d2a218730361ff9ab5cc3ee6ad3f..0c0a7925b9e16350907e3287a388b37b3ec2f9bf 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -12,18 +12,9 @@
var GlobalNumber = global.Number;
var GlobalObject = global.Object;
var iteratorSymbol = utils.ImportNow("iterator_symbol");
-var MakeRangeError;
-var MakeSyntaxError;
-var MakeTypeError;
var NaN = %GetRootNaN();
var ObjectToString = utils.ImportNow("object_to_string");
-utils.Import(function(from) {
- MakeRangeError = from.MakeRangeError;
- MakeSyntaxError = from.MakeSyntaxError;
- MakeTypeError = from.MakeTypeError;
-});
-
// ----------------------------------------------------------------------------
@@ -136,7 +127,7 @@ function GetMethod(obj, p) {
var func = obj[p];
if (IS_NULL_OR_UNDEFINED(func)) return UNDEFINED;
if (IS_CALLABLE(func)) return func;
- throw MakeTypeError(kCalledNonCallable, typeof func);
+ throw %make_type_error(kCalledNonCallable, typeof func);
}
// ES6 section 19.1.2.18.
@@ -144,7 +135,7 @@ function ObjectSetPrototypeOf(obj, proto) {
CHECK_OBJECT_COERCIBLE(obj, "Object.setPrototypeOf");
if (proto !== null && !IS_RECEIVER(proto)) {
- throw MakeTypeError(kProtoObjectOrNull, proto);
+ throw %make_type_error(kProtoObjectOrNull, proto);
}
if (IS_RECEIVER(obj)) {
@@ -289,11 +280,11 @@ function GetIterator(obj, method) {
method = obj[iteratorSymbol];
}
if (!IS_CALLABLE(method)) {
- throw MakeTypeError(kNotIterable, obj);
+ throw %make_type_error(kNotIterable, obj);
}
var iterator = %_Call(method, obj);
if (!IS_RECEIVER(iterator)) {
- throw MakeTypeError(kNotAnIterator, iterator);
+ throw %make_type_error(kNotAnIterator, iterator);
}
return iterator;
}
« src/bootstrapper.cc ('K') | « src/js/typedarray.js ('k') | src/js/weak-collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698