1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37:35 +00:00

LibJS: Handle Proxy with Array target in IsArray() abstract operation

This was missing from Value::is_array(), which is equivalent to the
spec's IsArray() abstract operation - it treats a Proxy value with an
Array target object as being an Array.
It can throw, so needs both the global object and an exception check
now.
This commit is contained in:
Linus Groh 2021-06-08 21:53:36 +01:00 committed by Andreas Kling
parent 9b35231453
commit 83be39c91a
11 changed files with 52 additions and 24 deletions

View file

@ -46,7 +46,6 @@ private:
virtual void visit_edges(Visitor&) override;
virtual bool is_function() const override { return m_target.is_function(); }
virtual bool is_array() const override { return m_target.is_array(); };
Object& m_target;
Object& m_handler;