1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

LibJS: Convert Object::set() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-03 00:32:43 +01:00
parent b7e5f08e56
commit 1d45541278
18 changed files with 89 additions and 188 deletions

View file

@ -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;
}