mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +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
|
@ -10,9 +10,10 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
ObjectEnvironmentRecord::ObjectEnvironmentRecord(Object& object, EnvironmentRecord* parent_scope)
|
||||
ObjectEnvironmentRecord::ObjectEnvironmentRecord(Object& object, IsWithEnvironment is_with_environment, EnvironmentRecord* parent_scope)
|
||||
: EnvironmentRecord(parent_scope)
|
||||
, m_object(object)
|
||||
, m_with_environment(is_with_environment == IsWithEnvironment::Yes)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue