mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:17:44 +00:00
LibJS: Add a [[Realm]] getter to FunctionObject and use it where needed
Defined by https://tc39.es/ecma262/#sec-ordinaryfunctioncreate step #17 and by https://tc39.es/ecma262/#sec-createbuiltinfunction step #6.
This commit is contained in:
parent
38b8fa8f3e
commit
5606332ed7
5 changed files with 11 additions and 3 deletions
|
@ -47,6 +47,9 @@ public:
|
|||
// Used as the outer environment when evaluating the code of the function.
|
||||
virtual EnvironmentRecord* environment() { return nullptr; }
|
||||
|
||||
// [[Realm]]
|
||||
virtual GlobalObject* realm() const { return nullptr; }
|
||||
|
||||
enum class ThisMode : u8 {
|
||||
Lexical,
|
||||
Strict,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue