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:
parent
45425de849
commit
9176a0de99
7 changed files with 32 additions and 56 deletions
|
@ -130,7 +130,7 @@ JS::ThrowCompletionOr<NodeFilter::Result> NodeIterator::filter(Node& node)
|
|||
{
|
||||
// 1. If traverser’s 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 node’s 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 object’s operation with traverser’s filter, "acceptNode", and « node ».
|
||||
// If this throws an exception, then unset traverser’s 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue