diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-05-05 15:02:03 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-06 08:07:28 +0200 |
commit | d16600a48ba2c267387335839969462a1f424339 (patch) | |
tree | fa62562e3fcd8ae6338c6cd2387946c6a06b743c /Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h | |
parent | 36bb04d7926929e804aa15dcf90695f453b78269 (diff) | |
download | serenity-d16600a48ba2c267387335839969462a1f424339.zip |
LibWeb: Propagate errors from StyleValue construction
Turns out we create a lot of these, mostly from places that don't return
ErrorOr. The yak stack grows.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h index 4fa6e1cf08..03aa437319 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h @@ -17,9 +17,9 @@ namespace Web::CSS { class UnresolvedStyleValue final : public StyleValue { public: - static ValueComparingNonnullRefPtr<UnresolvedStyleValue> create(Vector<Parser::ComponentValue>&& values, bool contains_var_or_attr) + static ErrorOr<ValueComparingNonnullRefPtr<UnresolvedStyleValue>> create(Vector<Parser::ComponentValue>&& values, bool contains_var_or_attr) { - return adopt_ref(*new UnresolvedStyleValue(move(values), contains_var_or_attr)); + return adopt_nonnull_ref_or_enomem(new (nothrow) UnresolvedStyleValue(move(values), contains_var_or_attr)); } virtual ~UnresolvedStyleValue() override = default; |