mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
LibWeb: Protect against null deref during Web::Page initialization
BrowsingContext::set_active_document() may end up asking for the Page's top level browsing context before Page has one. Do a workaround for now where we have an API to ask if it's initialized. Long-term we should find a cleaner solution.
This commit is contained in:
parent
f07ac8f20a
commit
33500bb6db
3 changed files with 9 additions and 1 deletions
|
@ -44,6 +44,9 @@ public:
|
|||
PageClient& client() { return m_client; }
|
||||
PageClient const& client() const { return m_client; }
|
||||
|
||||
// FIXME: This is a hack.
|
||||
bool top_level_browsing_context_is_initialized() const;
|
||||
|
||||
HTML::BrowsingContext& top_level_browsing_context();
|
||||
HTML::BrowsingContext const& top_level_browsing_context() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue