From 123cdfa1f1a42b438ea1f14cb20844489ecaa35e Mon Sep 17 00:00:00 2001 From: davidot Date: Mon, 29 Aug 2022 23:04:55 +0200 Subject: [PATCH] LibJS: Properly initialize the global object for $262.createRealm --- Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp b/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp index bca046a5cc..65edc88d48 100644 --- a/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp +++ b/Userland/Libraries/LibJS/Contrib/Test262/$262Object.cpp @@ -62,6 +62,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::create_realm) auto* realm_global_object = vm.heap().allocate_without_realm(*realm); VERIFY(realm_global_object); realm->set_global_object(realm_global_object, nullptr); + set_default_global_bindings(*realm); realm_global_object->initialize(*realm); return Value(realm_global_object->$262()); }