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

Unified Diff: src/js/runtime.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
« src/bootstrapper.cc ('K') | « src/js/regexp.js ('k') | src/js/spread.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/runtime.js
diff --git a/src/js/runtime.js b/src/js/runtime.js
index 216685fe4f2692eba560e0be9aedd03a919b6c01..b3c4addce873cec20b97bb50a42a53faad3050e1 100644
--- a/src/js/runtime.js
+++ b/src/js/runtime.js
@@ -19,13 +19,9 @@
var GlobalArray = global.Array;
var GlobalBoolean = global.Boolean;
var GlobalString = global.String;
-var MakeRangeError;
-var MakeTypeError;
var speciesSymbol;
utils.Import(function(from) {
- MakeRangeError = from.MakeRangeError;
- MakeTypeError = from.MakeTypeError;
speciesSymbol = from.species_symbol;
});
@@ -40,7 +36,7 @@ utils.Import(function(from) {
function ToPositiveInteger(x, rangeErrorIndex) {
var i = TO_INTEGER(x) + 0;
- if (i < 0) throw MakeRangeError(rangeErrorIndex);
+ if (i < 0) throw %make_range_error(rangeErrorIndex);
return i;
}
@@ -66,7 +62,7 @@ function SpeciesConstructor(object, defaultConstructor) {
return defaultConstructor;
}
if (!IS_RECEIVER(constructor)) {
- throw MakeTypeError(kConstructorNotReceiver);
+ throw %make_type_error(kConstructorNotReceiver);
}
var species = constructor[speciesSymbol];
if (IS_NULL_OR_UNDEFINED(species)) {
@@ -75,7 +71,7 @@ function SpeciesConstructor(object, defaultConstructor) {
if (%IsConstructor(species)) {
return species;
}
- throw MakeTypeError(kSpeciesNotConstructor);
+ throw %make_type_error(kSpeciesNotConstructor);
}
//----------------------------------------------------------------------------
« src/bootstrapper.cc ('K') | « src/js/regexp.js ('k') | src/js/spread.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698