LibJS: Make Cell::initialize() return void

Stop worrying about tiny OOMs.

Work towards #20405
This commit is contained in:
Andreas Kling 2023-08-07 08:41:28 +02:00
parent fde26c53f0
commit 18c54d8d40
Notes: sideshowbarker 2024-07-17 05:09:48 +09:00
804 changed files with 1330 additions and 2171 deletions

View file

@ -20,10 +20,10 @@ ReflectObject::ReflectObject(Realm& realm)
{
}
ThrowCompletionOr<void> ReflectObject::initialize(Realm& realm)
void ReflectObject::initialize(Realm& realm)
{
auto& vm = this->vm();
MUST_OR_THROW_OOM(Base::initialize(realm));
Base::initialize(realm);
u8 attr = Attribute::Writable | Attribute::Configurable;
define_native_function(realm, vm.names.apply, apply, 3, attr);
define_native_function(realm, vm.names.construct, construct, 2, attr);
@ -41,8 +41,6 @@ ThrowCompletionOr<void> ReflectObject::initialize(Realm& realm)
// 28.1.14 Reflect [ @@toStringTag ], https://tc39.es/ecma262/#sec-reflect-@@tostringtag
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, vm.names.Reflect.as_string()), Attribute::Configurable);
return {};
}
// 28.1.1 Reflect.apply ( target, thisArgument, argumentsList ), https://tc39.es/ecma262/#sec-reflect.apply