LibJS: Mark JS::Cell::initialize() as MUST_UPCALL

Intermediate classes in the initialize() chain set up prototypes and
define properties. Forgetting to call Base::initialize() in any
override would silently skip that setup.
This commit is contained in:
Andreas Kling
2026-01-30 10:45:09 +01:00
committed by Jelle Raaijmakers
parent 5b26777904
commit 74a80b7bfc
Notes: github-actions[bot] 2026-02-06 12:52:18 +00:00
5 changed files with 7 additions and 3 deletions

View File

@@ -24,8 +24,9 @@ CollatorCompareFunction::CollatorCompareFunction(Realm& realm, Collator& collato
{
}
void CollatorCompareFunction::initialize(Realm&)
void CollatorCompareFunction::initialize(Realm& realm)
{
Base::initialize(realm);
auto& vm = this->vm();
define_direct_property(vm.names.length, Value(2), Attribute::Configurable);
define_direct_property(vm.names.name, PrimitiveString::create(vm, String {}), Attribute::Configurable);