diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-21 15:12:43 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-23 13:58:30 +0100 |
commit | 275a7a0c0a2de638639e0a401c5d67fae8b9fedf (patch) | |
tree | 4bb5d1e8444e9a51835e76cb65ba065e6f466953 /Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp | |
parent | a022e548b808df91c471cb55f0245e15957e89c4 (diff) | |
download | serenity-275a7a0c0a2de638639e0a401c5d67fae8b9fedf.zip |
LibJS: Replace GlobalObject with VM in Environment AOs [Part 5/19]
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp b/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp index e212a2aa58..1383383885 100644 --- a/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp +++ b/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp @@ -61,21 +61,21 @@ bool FunctionEnvironment::has_super_binding() const } // 9.1.1.3.4 GetThisBinding ( ), https://tc39.es/ecma262/#sec-function-environment-records-getthisbinding -ThrowCompletionOr<Value> FunctionEnvironment::get_this_binding(GlobalObject&) const +ThrowCompletionOr<Value> FunctionEnvironment::get_this_binding(VM& vm) const { // 1. Assert: envRec.[[ThisBindingStatus]] is not lexical. VERIFY(m_this_binding_status != ThisBindingStatus::Lexical); // 2. If envRec.[[ThisBindingStatus]] is uninitialized, throw a ReferenceError exception. if (m_this_binding_status == ThisBindingStatus::Uninitialized) - return vm().throw_completion<ReferenceError>(ErrorType::ThisHasNotBeenInitialized); + return vm.throw_completion<ReferenceError>(ErrorType::ThisHasNotBeenInitialized); // 3. Return envRec.[[ThisValue]]. return m_this_value; } // 9.1.1.3.1 BindThisValue ( V ), https://tc39.es/ecma262/#sec-bindthisvalue -ThrowCompletionOr<Value> FunctionEnvironment::bind_this_value(GlobalObject&, Value this_value) +ThrowCompletionOr<Value> FunctionEnvironment::bind_this_value(VM& vm, Value this_value) { VERIFY(!this_value.is_empty()); @@ -84,7 +84,7 @@ ThrowCompletionOr<Value> FunctionEnvironment::bind_this_value(GlobalObject&, Val // 2. If envRec.[[ThisBindingStatus]] is initialized, throw a ReferenceError exception. if (m_this_binding_status == ThisBindingStatus::Initialized) - return vm().throw_completion<ReferenceError>(ErrorType::ThisIsAlreadyInitialized); + return vm.throw_completion<ReferenceError>(ErrorType::ThisIsAlreadyInitialized); // 3. Set envRec.[[ThisValue]] to V. m_this_value = this_value; |