mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +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:
parent
5ee1ae37b2
commit
e480d69130
17 changed files with 172 additions and 96 deletions
|
@ -14,7 +14,7 @@ class Array : public Object {
|
|||
JS_OBJECT(Array, Object);
|
||||
|
||||
public:
|
||||
static Array* create(GlobalObject&, size_t length = 0);
|
||||
static Array* create(GlobalObject&, size_t length, Object* prototype = nullptr);
|
||||
static Array* create_from(GlobalObject&, const Vector<Value>&);
|
||||
|
||||
explicit Array(Object& prototype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue