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
commit 83be39c91a
Notes: sideshowbarker 2024-07-18 12:35:55 +09:00
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;