1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

LibWeb: Make factory method of DOM::DocumentType fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 20:47:43 +01:00 committed by Linus Groh
parent 5f552ddc5c
commit c4d559bd37
3 changed files with 4 additions and 4 deletions

View file

@ -114,7 +114,7 @@ JS::NonnullGCPtr<Document> DOMImplementation::create_html_document(DeprecatedStr
WebIDL::ExceptionOr<JS::NonnullGCPtr<DocumentType>> DOMImplementation::create_document_type(DeprecatedString const& qualified_name, DeprecatedString const& public_id, DeprecatedString const& system_id)
{
TRY(Document::validate_qualified_name(realm(), qualified_name));
auto document_type = DocumentType::create(document());
auto document_type = TRY(DocumentType::create(document()));
document_type->set_name(qualified_name);
document_type->set_public_id(public_id);
document_type->set_system_id(system_id);