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

LibWeb: Make factory method of DOMParsing::XMLSerializer fallible

This commit is contained in:
Kenneth Myhra 2023-02-19 16:51:16 +01:00 committed by Andreas Kling
parent f918d12655
commit 77e4432367
2 changed files with 3 additions and 3 deletions

View file

@ -21,9 +21,9 @@
namespace Web::DOMParsing { 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) XMLSerializer::XMLSerializer(JS::Realm& realm)

View file

@ -14,7 +14,7 @@ class XMLSerializer final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(XMLSerializer, Bindings::PlatformObject); WEB_PLATFORM_OBJECT(XMLSerializer, Bindings::PlatformObject);
public: public:
static JS::NonnullGCPtr<XMLSerializer> construct_impl(JS::Realm&); static WebIDL::ExceptionOr<JS::NonnullGCPtr<XMLSerializer>> construct_impl(JS::Realm&);
virtual ~XMLSerializer() override; virtual ~XMLSerializer() override;