1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

LibJS: Replace GlobalObject with VM in Value AOs [Part 4/19]

This is where the fun begins. :^)
This commit is contained in:
Linus Groh 2022-08-21 14:00:56 +01:00
parent f6c4a0f5d0
commit a022e548b8
129 changed files with 1230 additions and 1325 deletions

View file

@ -119,6 +119,7 @@ JS::ThrowCompletionOr<NodeFilter::Result> NodeIterator::filter(Node& node)
{
VERIFY(wrapper());
auto& global_object = wrapper()->global_object();
auto& vm = wrapper()->vm();
// 1. If traversers active flag is set, then throw an "InvalidStateError" DOMException.
if (m_active)
@ -150,7 +151,7 @@ JS::ThrowCompletionOr<NodeFilter::Result> NodeIterator::filter(Node& node)
m_active = false;
// 8. Return result.
auto result_value = TRY(result.value()->to_i32(global_object));
auto result_value = TRY(result.value()->to_i32(vm));
return static_cast<NodeFilter::Result>(result_value);
}