LibWeb: Use GC::Ptr for BrowsingContext pointer saved in Document

Likely we forgot to update `WeakPtr` to `GC::Ptr` after converting
`BrowsingContext` to GC-allocated object.
This commit is contained in:
Aliaksandr Kalenik 2025-07-17 16:26:59 +02:00 committed by Sam Atkins
parent 59a867d3e3
commit 1bf4d3391e
Notes: github-actions[bot] 2025-07-17 14:56:57 +00:00
5 changed files with 9 additions and 9 deletions

View file

@ -308,10 +308,10 @@ public:
String title() const;
WebIDL::ExceptionOr<void> set_title(String const&);
HTML::BrowsingContext* browsing_context() { return m_browsing_context.ptr(); }
HTML::BrowsingContext const* browsing_context() const { return m_browsing_context.ptr(); }
GC::Ptr<HTML::BrowsingContext> browsing_context() { return m_browsing_context; }
GC::Ptr<HTML::BrowsingContext const> browsing_context() const { return m_browsing_context; }
void set_browsing_context(HTML::BrowsingContext*);
void set_browsing_context(GC::Ptr<HTML::BrowsingContext>);
Page& page();
Page const& page() const;
@ -960,7 +960,7 @@ private:
OwnPtr<CSS::StyleComputer> m_style_computer;
GC::Ptr<CSS::StyleSheetList> m_style_sheets;
GC::Ptr<Node> m_active_favicon;
WeakPtr<HTML::BrowsingContext> m_browsing_context;
GC::Ptr<HTML::BrowsingContext> m_browsing_context;
URL::URL m_url;
mutable OwnPtr<ElementByIdMap> m_element_by_id;