mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
LibJS: Add ObjectEnvironmentRecord.[[IsWithEnvironment]] field
This is true for environments created by `with` statements, and false for other (global) object environments. Also add the WithBaseObject abstract operation while we're here.
This commit is contained in:
parent
3f8857cd21
commit
0cd65b55bd
5 changed files with 22 additions and 7 deletions
|
@ -34,6 +34,8 @@ public:
|
|||
virtual bool has_this_binding() const { return false; }
|
||||
virtual Value get_this_binding(GlobalObject&) const { return {}; }
|
||||
|
||||
virtual Object* with_base_object() const { return nullptr; }
|
||||
|
||||
virtual bool has_binding([[maybe_unused]] FlyString const& name) const { return false; }
|
||||
virtual void create_mutable_binding(GlobalObject&, [[maybe_unused]] FlyString const& name, [[maybe_unused]] bool can_be_deleted) { }
|
||||
virtual void create_immutable_binding(GlobalObject&, [[maybe_unused]] FlyString const& name, [[maybe_unused]] bool strict) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue