summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2023-02-14 21:49:02 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-18 00:52:47 +0100
commit0d9076c9f57bb5eba064a803241e9d25843b58f1 (patch)
tree77a79f34a1ae1665c6fe2421379da0c9002adeee /Userland/Libraries/LibWeb/Loader
parent552663a2ba934424ce1279cd4959d225a1f287cf (diff)
downloadserenity-0d9076c9f57bb5eba064a803241e9d25843b58f1.zip
LibWeb: Make factory methods of DOM::Document fallible
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r--Userland/Libraries/LibWeb/Loader/FrameLoader.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
index 25d585a646..2ef44a0d3a 100644
--- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
@@ -313,10 +313,7 @@ void FrameLoader::load_html(StringView html, const AK::URL& url)
.reserved_environment = {},
.browsing_context = browsing_context(),
};
- auto document = DOM::Document::create_and_initialize(
- DOM::Document::Type::HTML,
- "text/html",
- move(navigation_params));
+ auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html", move(navigation_params)).release_value_but_fixme_should_propagate_errors();
browsing_context().set_active_document(document);
auto parser = HTML::HTMLParser::create(document, html, "utf-8");
@@ -413,11 +410,7 @@ void FrameLoader::resource_did_load()
.reserved_environment = {},
.browsing_context = browsing_context(),
};
- auto document = DOM::Document::create_and_initialize(
- DOM::Document::Type::HTML,
- "text/html",
- move(navigation_params));
-
+ auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html", move(navigation_params)).release_value_but_fixme_should_propagate_errors();
document->set_url(url);
document->set_encoding(resource()->encoding());
document->set_content_type(resource()->mime_type());