mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09: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:
parent
2898701459
commit
83c5ff57d8
Notes:
sideshowbarker
2024-07-17 05:17:17 +09:00
Author: https://github.com/awesomekling
Commit: 83c5ff57d8
Pull-request: https://github.com/SerenityOS/serenity/pull/15672
15 changed files with 225 additions and 44 deletions
|
@ -30,7 +30,7 @@ struct SessionHistoryEntry {
|
|||
AK::URL url;
|
||||
|
||||
// document, a Document or null
|
||||
WeakPtr<DOM::Document> document;
|
||||
JS::GCPtr<DOM::Document> document;
|
||||
|
||||
// serialized state, which is serialized state or null, initially null
|
||||
Optional<String> serialized_state;
|
||||
|
@ -49,7 +49,7 @@ struct SessionHistoryEntry {
|
|||
// FIXME: persisted user state, which is implementation-defined, initially null
|
||||
// NOTE: This is where we could remember the state of form controls, for example.
|
||||
|
||||
WeakPtr<BrowsingContext> original_source_browsing_context;
|
||||
JS::GCPtr<BrowsingContext> original_source_browsing_context;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue