mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
LibJS: Bring ArrayCreate and ArrayConstructor closer to spec
Specifically, this now explicitly takes the length, adds missing exceptions checks to calls with user-supplied lengths, takes and uses the prototype argument, and fixes some spec non-conformance in ArrayConstructor and its native functions around the use of ArrayCreate
This commit is contained in:
committed by
Linus Groh
parent
5ee1ae37b2
commit
e480d69130
@@ -134,7 +134,7 @@ void IteratorToArray::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
if (vm.exception())
|
||||
return;
|
||||
|
||||
auto array = Array::create(global_object);
|
||||
auto array = Array::create(global_object, 0);
|
||||
size_t index = 0;
|
||||
|
||||
while (true) {
|
||||
|
||||
Reference in New Issue
Block a user