summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-05-05 15:02:03 +0100
committerAndreas Kling <kling@serenityos.org>2023-05-06 08:07:28 +0200
commitd16600a48ba2c267387335839969462a1f424339 (patch)
treefa62562e3fcd8ae6338c6cd2387946c6a06b743c /Userland/Libraries/LibWeb/CSS/StyleValues/UnresolvedStyleValue.h
parent36bb04d7926929e804aa15dcf90695f453b78269 (diff)
downloadserenity-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.h4
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;