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

Unified Diff: src/js/array-iterator.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/array-iterator.js
diff --git a/src/js/array-iterator.js b/src/js/array-iterator.js
index ce2f2951ef3ba41d16a9c99f1cc00ec29f51f0d7..227f733a059150259d55120df60deb30fd9e7938 100644
--- a/src/js/array-iterator.js
+++ b/src/js/array-iterator.js
@@ -20,14 +20,9 @@ var arrayIteratorObjectSymbol =
var GlobalArray = global.Array;
var IteratorPrototype = utils.ImportNow("IteratorPrototype");
var iteratorSymbol = utils.ImportNow("iterator_symbol");
-var MakeTypeError;
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
var GlobalTypedArray = %object_get_prototype_of(global.Uint8Array);
-utils.Import(function(from) {
- MakeTypeError = from.MakeTypeError;
-})
-
// -----------------------------------------------------------------------
function ArrayIterator() {}
@@ -63,7 +58,7 @@ function ArrayIteratorNext() {
if (!IS_RECEIVER(iterator) ||
!HAS_DEFINED_PRIVATE(iterator, arrayIteratorNextIndexSymbol)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
+ throw %make_type_error(kIncompatibleMethodReceiver,
'Array Iterator.prototype.next', this);
}
@@ -111,19 +106,19 @@ function ArrayKeys() {
// TODO(littledan): Check for detached TypedArray in these three methods
function TypedArrayEntries() {
- if (!IS_TYPEDARRAY(this)) throw MakeTypeError(kNotTypedArray);
+ if (!IS_TYPEDARRAY(this)) throw %make_type_error(kNotTypedArray);
return %_Call(ArrayEntries, this);
}
function TypedArrayValues() {
- if (!IS_TYPEDARRAY(this)) throw MakeTypeError(kNotTypedArray);
+ if (!IS_TYPEDARRAY(this)) throw %make_type_error(kNotTypedArray);
return %_Call(ArrayValues, this);
}
function TypedArrayKeys() {
- if (!IS_TYPEDARRAY(this)) throw MakeTypeError(kNotTypedArray);
+ if (!IS_TYPEDARRAY(this)) throw %make_type_error(kNotTypedArray);
return %_Call(ArrayKeys, this);
}
« src/bootstrapper.cc ('K') | « src/js/array.js ('k') | src/js/arraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698