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

Unified Diff: src/array-iterator.js

Issue 1309243003: ES6: Array.prototype.slice and friends should use ToLength instead of ToUint32 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/array.js ('k') | src/bootstrapper.cc » ('j') | src/debug/liveedit.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array-iterator.js
diff --git a/src/array-iterator.js b/src/array-iterator.js
index 67f1eeff9ed4eca712dec66247eb821d76d75f39..9765d547456ee65ab076f8987d3071ceae875ee8 100644
--- a/src/array-iterator.js
+++ b/src/array-iterator.js
@@ -20,6 +20,12 @@ var arrayIteratorNextIndexSymbol =
var arrayIteratorObjectSymbol =
utils.GetPrivateSymbol("array_iterator_object_symbol");
var GlobalArray = global.Array;
+var ToLengthFlagged;
+
+utils.Import(function(from) {
+ ToLengthFlagged = from.ToLengthFlagged;
+});
+
macro TYPED_ARRAYS(FUNCTION)
FUNCTION(Uint8Array)
@@ -88,7 +94,7 @@ function ArrayIteratorNext() {
var index = GET_PRIVATE(iterator, arrayIteratorNextIndexSymbol);
var itemKind = GET_PRIVATE(iterator, arrayIterationKindSymbol);
- var length = TO_UINT32(array.length);
+ var length = ToLengthFlagged(array.length);
// "sparse" is never used.
« no previous file with comments | « src/array.js ('k') | src/bootstrapper.cc » ('j') | src/debug/liveedit.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698