From 6516329867dae808d0c81562d341fb0ed253797c Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Tue, 14 Feb 2023 20:22:02 +0100 Subject: [PATCH] LibWeb: Propagate error in factory method of DOM::StaticRange --- Userland/Libraries/LibWeb/DOM/StaticRange.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/StaticRange.cpp b/Userland/Libraries/LibWeb/DOM/StaticRange.cpp index 1446c99117e..c941f2a1aec 100644 --- a/Userland/Libraries/LibWeb/DOM/StaticRange.cpp +++ b/Userland/Libraries/LibWeb/DOM/StaticRange.cpp @@ -32,7 +32,7 @@ WebIDL::ExceptionOr StaticRange::construct_impl(JS::Realm& realm, return WebIDL::InvalidNodeTypeError::create(realm, "endContainer cannot be a DocumentType or Attribute node."); // 2. Set this’s start to (init["startContainer"], init["startOffset"]) and end to (init["endContainer"], init["endOffset"]). - return realm.heap().allocate(realm, *init.start_container, init.start_offset, *init.end_container, init.end_offset).release_allocated_value_but_fixme_should_propagate_errors().ptr(); + return MUST_OR_THROW_OOM(realm.heap().allocate(realm, *init.start_container, init.start_offset, *init.end_container, init.end_offset)).ptr(); } JS::ThrowCompletionOr StaticRange::initialize(JS::Realm& realm)