From 7b0c2da14f0b555712792c8794a283e7b47ef13b Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Wed, 23 Apr 2025 03:07:14 -0600 Subject: [PATCH] LibWeb: Account for LegacyNamespace attribute in constructor generator When playing games with cross-realm construction, we need to make sure that any calls to ensure_web_prototype for LegacyNamespace objects use the correctly namespaced prototype name. --- .../CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index f180c8fdb24..11be8b0114f 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -2771,7 +2771,7 @@ JS::ThrowCompletionOr> @constructor_class@::construct@overlo // 2. Set prototype to the interface prototype object for interface in targetRealm. VERIFY(target_realm); - prototype = &Bindings::ensure_web_prototype<@prototype_class@>(*target_realm, "@name@"_fly_string); + prototype = &Bindings::ensure_web_prototype<@prototype_class@>(*target_realm, "@namespaced_name@"_fly_string); } // 4. Let instance be MakeBasicObject( « [[Prototype]], [[Extensible]], [[Realm]], [[PrimaryInterface]] »).