mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
LibWeb: Make factory method of CSS::CSSSupportsRule fallible
This commit is contained in:
parent
ada0a59fc1
commit
64e4d3fd94
3 changed files with 4 additions and 4 deletions
|
@ -11,9 +11,9 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
CSSSupportsRule* CSSSupportsRule::create(JS::Realm& realm, NonnullRefPtr<Supports>&& supports, CSSRuleList& rules)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<CSSSupportsRule>> CSSSupportsRule::create(JS::Realm& realm, NonnullRefPtr<Supports>&& supports, CSSRuleList& rules)
|
||||
{
|
||||
return realm.heap().allocate<CSSSupportsRule>(realm, realm, move(supports), rules).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<CSSSupportsRule>(realm, realm, move(supports), rules));
|
||||
}
|
||||
|
||||
CSSSupportsRule::CSSSupportsRule(JS::Realm& realm, NonnullRefPtr<Supports>&& supports, CSSRuleList& rules)
|
||||
|
|
|
@ -20,7 +20,7 @@ class CSSSupportsRule final : public CSSConditionRule {
|
|||
WEB_PLATFORM_OBJECT(CSSSupportsRule, CSSConditionRule);
|
||||
|
||||
public:
|
||||
static CSSSupportsRule* create(JS::Realm&, NonnullRefPtr<Supports>&&, CSSRuleList&);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<CSSSupportsRule>> create(JS::Realm&, NonnullRefPtr<Supports>&&, CSSRuleList&);
|
||||
|
||||
virtual ~CSSSupportsRule() = default;
|
||||
|
||||
|
|
|
@ -3084,7 +3084,7 @@ CSSRule* Parser::convert_to_rule(NonnullRefPtr<Rule> rule)
|
|||
}
|
||||
|
||||
auto rule_list = CSSRuleList::create(m_context.realm(), child_rules).release_value_but_fixme_should_propagate_errors();
|
||||
return CSSSupportsRule::create(m_context.realm(), supports.release_nonnull(), rule_list);
|
||||
return CSSSupportsRule::create(m_context.realm(), supports.release_nonnull(), rule_list).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
// FIXME: More at rules!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue