mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibJS: Convert the RegExpCreate AO to ThrowCompletionOr
This commit is contained in:
committed by
Andreas Kling
parent
d9f5e2d461
commit
844be7a0a5
@@ -190,10 +190,10 @@ String RegExpObject::escape_regexp_pattern() const
|
||||
}
|
||||
|
||||
// 22.2.3.2.4 RegExpCreate ( P, F ), https://tc39.es/ecma262/#sec-regexpcreate
|
||||
RegExpObject* regexp_create(GlobalObject& global_object, Value pattern, Value flags)
|
||||
ThrowCompletionOr<RegExpObject*> regexp_create(GlobalObject& global_object, Value pattern, Value flags)
|
||||
{
|
||||
auto* regexp_object = RegExpObject::create(global_object);
|
||||
return TRY_OR_DISCARD(regexp_object->regexp_initialize(global_object, pattern, flags));
|
||||
return TRY(regexp_object->regexp_initialize(global_object, pattern, flags));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user