LibWeb: Assert that cloned node is not null before returning

This makes potential issues easier to track down.
This commit is contained in:
Tim Ledbetter 2024-07-23 21:10:32 +01:00 committed by Sam Atkins
parent 72ed62a560
commit f8b1e96e2b
Notes: github-actions[bot] 2024-07-25 14:58:26 +00:00

View file

@ -1040,6 +1040,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Node>> Node::clone_node(Document* document,
}
// 7. Return copy.
VERIFY(copy);
return JS::NonnullGCPtr { *copy };
}