1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

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

@ -17,10 +17,10 @@ RegExpConstructor::RegExpConstructor(Realm& realm)
{
}
ThrowCompletionOr<void> RegExpConstructor::initialize(Realm& realm)
void RegExpConstructor::initialize(Realm& realm)
{
auto& vm = this->vm();
MUST_OR_THROW_OOM(NativeFunction::initialize(realm));
Base::initialize(realm);
// 22.2.5.1 RegExp.prototype, https://tc39.es/ecma262/#sec-regexp.prototype
define_direct_property(vm.names.prototype, realm.intrinsics().regexp_prototype(), 0);
@ -49,8 +49,6 @@ ThrowCompletionOr<void> RegExpConstructor::initialize(Realm& realm)
define_native_accessor(realm, vm.names.$7, group_7_getter, {}, Attribute::Configurable);
define_native_accessor(realm, vm.names.$8, group_8_getter, {}, Attribute::Configurable);
define_native_accessor(realm, vm.names.$9, group_9_getter, {}, Attribute::Configurable);
return {};
}
// 22.2.4.1 RegExp ( pattern, flags ), https://tc39.es/ecma262/#sec-regexp-pattern-flags