From 5f253988ef95f5664ce76e89df4609099d9d1659 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 31 Jul 2022 12:20:17 +0200 Subject: [PATCH] LibJS: Call HostEnsureCanCompileStrings in PerformShadowRealmEval We now do have this host-defined abstract operation :^) --- Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp b/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp index d06eef543d..df3dfe34de 100644 --- a/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp +++ b/Userland/Libraries/LibJS/Runtime/ShadowRealm.cpp @@ -97,8 +97,9 @@ ThrowCompletionOr perform_shadow_realm_eval(GlobalObject& global_object, { auto& vm = global_object.vm(); + // FIXME: Needs to be updated to latest ECMA-262. See: https://github.com/tc39/proposal-shadowrealm/issues/367 // 1. Perform ? HostEnsureCanCompileStrings(callerRealm, evalRealm). - // FIXME: We don't have this host-defined abstract operation yet. + TRY(vm.host_ensure_can_compile_strings(eval_realm)); // 2. Perform the following substeps in an implementation-defined order, possibly interleaving parsing and error detection: