mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 14:05:15 +00:00
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.
This commit is contained in:
parent
79352ad725
commit
7b0c2da14f
Notes:
github-actions[bot]
2025-04-23 12:32:15 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/7b0c2da14f0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4440 Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
@ -2771,7 +2771,7 @@ JS::ThrowCompletionOr<GC::Ref<JS::Object>> @constructor_class@::construct@overlo
|
||||||
|
|
||||||
// 2. Set prototype to the interface prototype object for interface in targetRealm.
|
// 2. Set prototype to the interface prototype object for interface in targetRealm.
|
||||||
VERIFY(target_realm);
|
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]] »).
|
// 4. Let instance be MakeBasicObject( « [[Prototype]], [[Extensible]], [[Realm]], [[PrimaryInterface]] »).
|
||||||
|
|
Loading…
Add table
Reference in a new issue