1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:17:44 +00:00

LibJS: Propagate errors from Intrinsics initialization

This commit is contained in:
Luke Wilde 2023-02-27 22:42:40 +00:00 committed by Linus Groh
parent af118f2a67
commit 53852452b2
6 changed files with 15 additions and 13 deletions

View file

@ -60,7 +60,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::clear_kept_objects)
JS_DEFINE_NATIVE_FUNCTION($262Object::create_realm)
{
auto realm = Realm::create(vm);
auto realm = MUST_OR_THROW_OOM(Realm::create(vm));
auto realm_global_object = vm.heap().allocate_without_realm<GlobalObject>(*realm);
VERIFY(realm_global_object);
realm->set_global_object(realm_global_object, nullptr);