diff options
author | Linus Groh <mail@linusgroh.de> | 2022-01-15 00:30:52 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-16 01:54:48 +0100 |
commit | 710de821e7ffaff4ea587f1be9a4d6872b62017f (patch) | |
tree | 0632481345676e71fd882713841e08f5d7d0c858 /Userland/Libraries | |
parent | 0c73fbbba515bca81a6e8db324124b99b7b68f01 (diff) | |
download | serenity-710de821e7ffaff4ea587f1be9a4d6872b62017f.zip |
LibJS: Add VM::active_function_object()
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/VM.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/VM.h b/Userland/Libraries/LibJS/Runtime/VM.h index 7025c95207..fb50667794 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.h +++ b/Userland/Libraries/LibJS/Runtime/VM.h @@ -123,6 +123,11 @@ public: Realm const* current_realm() const { return running_execution_context().realm; } Realm* current_realm() { return running_execution_context().realm; } + // https://tc39.es/ecma262/#active-function-object + // The value of the Function component of the running execution context is also called the active function object. + FunctionObject const* active_function_object() const { return running_execution_context().function; } + FunctionObject* active_function_object() { return running_execution_context().function; } + bool in_strict_mode() const; size_t argument_count() const |