1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:07:34 +00:00

LibWeb: Stop using Bindings::wrap() in a bunch of places

wrap() is now basically a no-op so we should stop using it everywhere
and eventually remove it. This patch removes uses of wrap() in
non-generated code.
This commit is contained in:
Andreas Kling 2022-09-04 21:48:54 +02:00
parent 45425de849
commit 9176a0de99
7 changed files with 32 additions and 56 deletions

View file

@ -130,7 +130,7 @@ JS::ThrowCompletionOr<NodeFilter::Result> NodeIterator::filter(Node& node)
{
// 1. If traversers active flag is set, then throw an "InvalidStateError" DOMException.
if (m_active)
return JS::throw_completion(wrap(shape().realm(), InvalidStateError::create(global_object(), "NodeIterator is already active")));
return throw_completion(InvalidStateError::create(global_object(), "NodeIterator is already active"));
// 2. Let n be nodes nodeType attribute value 1.
auto n = node.node_type() - 1;
@ -148,7 +148,7 @@ JS::ThrowCompletionOr<NodeFilter::Result> NodeIterator::filter(Node& node)
// 6. Let result be the return value of call a user objects operation with traversers filter, "acceptNode", and « node ».
// If this throws an exception, then unset traversers active flag and rethrow the exception.
auto result = Bindings::IDL::call_user_object_operation(m_filter->callback(), "acceptNode", {}, wrap(shape().realm(), node));
auto result = Bindings::IDL::call_user_object_operation(m_filter->callback(), "acceptNode", {}, &node);
if (result.is_abrupt()) {
m_active = false;
return result;