mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
LibWeb: Make factory method of DOM::Comment fallible
This commit is contained in:
parent
50c5f0d7da
commit
5ef9e02658
2 changed files with 3 additions and 3 deletions
|
@ -16,10 +16,10 @@ Comment::Comment(Document& document, DeprecatedString const& data)
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-comment-comment
|
||||
JS::NonnullGCPtr<Comment> Comment::construct_impl(JS::Realm& realm, DeprecatedString const& data)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Comment>> Comment::construct_impl(JS::Realm& realm, DeprecatedString const& data)
|
||||
{
|
||||
auto& window = verify_cast<HTML::Window>(realm.global_object());
|
||||
return realm.heap().allocate<Comment>(realm, window.associated_document(), data).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<Comment>(realm, window.associated_document(), data));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue