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

LibWeb: Make factory methods of DOM::Document fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 21:49:02 +01:00 committed by Linus Groh
parent 552663a2ba
commit 0d9076c9f5
8 changed files with 17 additions and 24 deletions

View file

@ -730,7 +730,7 @@ JS::NonnullGCPtr<Node> Node::clone_node(Document* document, bool clone_children)
else if (is<Document>(this)) {
// Document
auto document_ = verify_cast<Document>(this);
auto document_copy = Document::create(this->realm(), document_->url());
auto document_copy = Document::create(this->realm(), document_->url()).release_value_but_fixme_should_propagate_errors();
// Set copys encoding, content type, URL, origin, type, and mode to those of node.
document_copy->set_encoding(document_->encoding());