mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibJS: Convert Object::set() to ThrowCompletionOr
This commit is contained in:
parent
b7e5f08e56
commit
1d45541278
18 changed files with 89 additions and 188 deletions
|
@ -183,9 +183,7 @@ RegExpObject* RegExpObject::regexp_initialize(GlobalObject& global_object, Value
|
|||
m_flags = move(f);
|
||||
m_regex = move(regex);
|
||||
|
||||
set(vm.names.lastIndex, Value(0), Object::ShouldThrowExceptions::Yes);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
TRY_OR_DISCARD(set(vm.names.lastIndex, Value(0), Object::ShouldThrowExceptions::Yes));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue