1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibWeb: Make BrowsingContext GC-allocated

(And BrowsingContextGroup had to come along for the ride as well.)
This solves a number of nasty reference cycles between browsing
contexts, history items, and their documents.
This commit is contained in:
Andreas Kling 2022-10-17 11:06:50 +02:00
parent 2898701459
commit 83c5ff57d8
15 changed files with 225 additions and 44 deletions

View file

@ -31,6 +31,8 @@ public:
protected:
BrowsingContextContainer(DOM::Document&, DOM::QualifiedName);
virtual void visit_edges(Cell::Visitor&) override;
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#shared-attribute-processing-steps-for-iframe-and-frame-elements
void shared_attribute_processing_steps_for_iframe_and_frame(bool initial_insertion);
@ -39,7 +41,7 @@ protected:
void create_new_nested_browsing_context();
RefPtr<BrowsingContext> m_nested_browsing_context;
JS::GCPtr<BrowsingContext> m_nested_browsing_context;
private:
virtual bool is_browsing_context_container() const override { return true; }