summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2023-02-19 16:51:16 +0100
committerAndreas Kling <kling@serenityos.org>2023-02-22 09:55:33 +0100
commit77e44323678a6828526c44c3712fb6d096b1e535 (patch)
tree4d83eebd13b7a9f5a15f72e9e3886bcfa16c2c7c /Userland
parentf918d12655e93c84a1a84fd136fb7e5dfb1cdb29 (diff)
downloadserenity-77e44323678a6828526c44c3712fb6d096b1e535.zip
LibWeb: Make factory method of DOMParsing::XMLSerializer fallible
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp4
-rw-r--r--Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp
index 14aedd50f3..869401c5c8 100644
--- a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp
+++ b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.cpp
@@ -21,9 +21,9 @@
namespace Web::DOMParsing {
-JS::NonnullGCPtr<XMLSerializer> XMLSerializer::construct_impl(JS::Realm& realm)
+WebIDL::ExceptionOr<JS::NonnullGCPtr<XMLSerializer>> XMLSerializer::construct_impl(JS::Realm& realm)
{
- return (realm.heap().allocate<XMLSerializer>(realm, realm)).release_allocated_value_but_fixme_should_propagate_errors();
+ return MUST_OR_THROW_OOM(realm.heap().allocate<XMLSerializer>(realm, realm));
}
XMLSerializer::XMLSerializer(JS::Realm& realm)
diff --git a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.h b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.h
index e616d5a6c9..2f82d0d073 100644
--- a/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.h
+++ b/Userland/Libraries/LibWeb/DOMParsing/XMLSerializer.h
@@ -14,7 +14,7 @@ class XMLSerializer final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(XMLSerializer, Bindings::PlatformObject);
public:
- static JS::NonnullGCPtr<XMLSerializer> construct_impl(JS::Realm&);
+ static WebIDL::ExceptionOr<JS::NonnullGCPtr<XMLSerializer>> construct_impl(JS::Realm&);
virtual ~XMLSerializer() override;