mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-15 21:41:58 +00:00
LibWeb: Don't crash on named property access on detached window
In WindowProxy.[[Get]] it's not guaranteed that the current principal global object has an associated document at the moment. This may happen if a script is continuing to execute while a navigation has been initiated. Because of that, we can't blindly dereference the active document pointer, so this patch adds a null check.
This commit is contained in:
parent
456608cf03
commit
2eea8894a1
Notes:
github-actions[bot]
2025-05-30 08:14:45 +00:00
Author: https://github.com/awesomekling
Commit: 2eea8894a1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4922
Reviewed-by: https://github.com/ADKaster
3 changed files with 13 additions and 13 deletions
|
@ -18,6 +18,6 @@ enum class AccessorAccessedRelationship {
|
|||
None,
|
||||
};
|
||||
|
||||
void check_if_access_between_two_browsing_contexts_should_be_reported(BrowsingContext const& accessor, BrowsingContext const* accessed, JS::PropertyKey const&, EnvironmentSettingsObject const&);
|
||||
void check_if_access_between_two_browsing_contexts_should_be_reported(GC::Ptr<BrowsingContext const> accessor, GC::Ptr<BrowsingContext const> accessed, JS::PropertyKey const&, GC::Ref<EnvironmentSettingsObject const>);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue