Truly independent web browser
LibJS: Stop wrapping array iterator indices past 2^31 - 1
Shannon Booth1d0ff87330cc
diff --git a/Libraries/LibJS/Rust/src/runtime/array_iterator.rs b/Libraries/LibJS/Rust/src/runtime/array_iterator.rsindex 909ee46256f..46c2adfb892 100644--- a/Libraries/LibJS/Rust/src/runtime/array_iterator.rs+++ b/Libraries/LibJS/Rust/src/runtime/array_iterator.rs@@ -149,8 +149,7 @@ impl ArrayIterator {self.index.set(index + 1);// 12. Let indexNumber be 𝔽(index).- // NB: The index is made an i32, which wraps for indices past 2^31 - 1.- let index_number = Value::from_i32(index as i32);+ let index_number = Value::from_f64(index as f64);// 13. If kind is KEY, thenlet result = if kind == PropertyKind::Key {