diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-28 13:39:44 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-29 00:02:45 +0000 |
commit | b75b7f0c0d6980e474f4aad910c6b7d45c876518 (patch) | |
tree | 2907bdea34ff11105129d1d28c8a90118c52feb6 /Meta | |
parent | 109b190a19e55f407521de14cd1f984ae61d77bf (diff) | |
download | serenity-b75b7f0c0d6980e474f4aad910c6b7d45c876518.zip |
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.
Diffstat (limited to 'Meta')
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp index b090e49a93..fc2c6ed46e 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWindowOrWorkerInterfaces.cpp @@ -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);)~~~"); |