mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:35:07 +00:00
LibWeb: Make factory method of HTML::TextMetrics fallible
This commit is contained in:
parent
d9845bb24b
commit
c5de2c3348
3 changed files with 5 additions and 4 deletions
|
@ -6,12 +6,13 @@
|
|||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/HTML/TextMetrics.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
JS::NonnullGCPtr<TextMetrics> TextMetrics::create(JS::Realm& realm)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<TextMetrics>> TextMetrics::create(JS::Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<TextMetrics>(realm, realm).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<TextMetrics>(realm, realm));
|
||||
}
|
||||
|
||||
TextMetrics::TextMetrics(JS::Realm& realm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue