diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-20 09:48:43 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-23 13:58:30 +0100 |
commit | 999da617c5a59f2c8bc8b199c69014ee04668ee1 (patch) | |
tree | 501d5e7ea375319fa8fb8f4385f6fecd6f76c338 /Userland/Libraries/LibJS/Bytecode | |
parent | f3117d46dc872a2d0f57273293b5691777b06279 (diff) | |
download | serenity-999da617c5a59f2c8bc8b199c69014ee04668ee1.zip |
LibJS: Remove GlobalObject from VM::this_value()
This is a continuation of the previous six commits.
The global object is only needed to return it if the execution context
stack is empty, but that doesn't seem like a useful thing to allow in
the first place - if you're not currently executing JS, and the
execution context stack is empty, there is no this value to retrieve.
Diffstat (limited to 'Userland/Libraries/LibJS/Bytecode')
-rw-r--r-- | Userland/Libraries/LibJS/Bytecode/Op.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/Op.cpp b/Userland/Libraries/LibJS/Bytecode/Op.cpp index b2391a9143..ab3a389cb0 100644 --- a/Userland/Libraries/LibJS/Bytecode/Op.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Op.cpp @@ -697,7 +697,7 @@ ThrowCompletionOr<void> GetObjectPropertyIterator::execute_impl(Bytecode::Interp interpreter.realm(), [seen_items = HashTable<PropertyKey>(), items = move(properties)](VM& vm, GlobalObject& global_object) mutable -> ThrowCompletionOr<Value> { auto& realm = *global_object.associated_realm(); - auto iterated_object_value = vm.this_value(global_object); + auto iterated_object_value = vm.this_value(); if (!iterated_object_value.is_object()) return vm.throw_completion<InternalError>("Invalid state for GetObjectPropertyIterator.next"); |