mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibWeb: Ensure principal realm returned for nested Shadow Realms
Recently reported against the shadow realm proposal after running into issues with WPT tests. In a nested shadow realm, the associated realm is a shadow realm, not the principal realm. One such issue this fixes is a crash when a nested shadow realm performs an operation which requires the principal settings object.
This commit is contained in:
parent
218ac86b67
commit
91007eb476
Notes:
github-actions[bot]
2024-11-30 11:07:04 +00:00
Author: https://github.com/shannonbooth
Commit: 91007eb476
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2631
3 changed files with 44 additions and 2 deletions
|
@ -580,8 +580,8 @@ ErrorOr<void> initialize_main_thread_vm(HTML::EventLoop::Type type)
|
|||
// 4. Set settings's execution context to context.
|
||||
.execution_context = move(context),
|
||||
|
||||
// 5. Set settings's principal realm to O's associated realm
|
||||
.principal_realm = object.shape().realm(),
|
||||
// 5. Set settings's principal realm to O's associated realm's principal realm
|
||||
.principal_realm = HTML::principal_realm(object.shape().realm()),
|
||||
|
||||
// 6. Set settings's module map to a new module map, initially empty.
|
||||
.module_map = realm.create<HTML::ModuleMap>(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue