mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate
Callers that are already in a fallible context will now TRY to allocate cells. Callers in infallible contexts get a FIXME.
This commit is contained in:
parent
109b190a19
commit
b75b7f0c0d
178 changed files with 565 additions and 565 deletions
|
@ -174,10 +174,10 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea
|
|||
{
|
||||
auto& vm = realm.vm();
|
||||
|
||||
auto prototype = heap().allocate<@prototype_class@>(realm, realm);
|
||||
auto prototype = heap().allocate<@prototype_class@>(realm, realm).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
m_prototypes.set("@interface_name@"sv, prototype);
|
||||
|
||||
auto constructor = heap().allocate<@constructor_class@>(realm, realm);
|
||||
auto constructor = heap().allocate<@constructor_class@>(realm, realm).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
m_constructors.set("@interface_name@"sv, constructor);
|
||||
|
||||
prototype->define_direct_property(vm.names.constructor, constructor.ptr(), JS::Attribute::Writable | JS::Attribute::Configurable);
|
||||
|
@ -188,7 +188,7 @@ void Intrinsics::create_web_prototype_and_constructor<@prototype_class@>(JS::Rea
|
|||
gen.set("legacy_interface_name", legacy_constructor->name);
|
||||
gen.set("legacy_constructor_class", legacy_constructor->constructor_class);
|
||||
gen.append(R"~~~(
|
||||
auto legacy_constructor = heap().allocate<@legacy_constructor_class@>(realm, realm);
|
||||
auto legacy_constructor = heap().allocate<@legacy_constructor_class@>(realm, realm).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
m_constructors.set("@legacy_interface_name@"sv, legacy_constructor);
|
||||
|
||||
legacy_constructor->define_direct_property(vm.names.name, JS::PrimitiveString::create(vm, "@legacy_interface_name@"sv), JS::Attribute::Configurable);)~~~");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue