1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:28:11 +00:00

LibWeb: Make SessionHistoryEntry GC-allocated

These will need to float around more than they're currently able to.
Put them on the GC heap to prepare for that.

Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
This commit is contained in:
Andreas Kling 2022-12-12 10:58:30 +01:00 committed by Linus Groh
parent 32557be930
commit 3b0e5a87db
7 changed files with 60 additions and 33 deletions

View file

@ -210,8 +210,9 @@ public:
JS::GCPtr<DOM::Node> currently_focused_area();
Vector<SessionHistoryEntry>& session_history() { return m_session_history; }
Vector<SessionHistoryEntry> const& session_history() const { return m_session_history; }
Vector<JS::NonnullGCPtr<SessionHistoryEntry>>& session_history() { return m_session_history; }
Vector<JS::NonnullGCPtr<SessionHistoryEntry>> const& session_history() const { return m_session_history; }
size_t session_history_index() const { return *m_session_history_index; }
// https://html.spec.whatwg.org/multipage/dom.html#still-on-its-initial-about:blank-document
@ -284,7 +285,7 @@ private:
Optional<size_t> m_session_history_index { 0 };
// https://html.spec.whatwg.org/multipage/history.html#session-history
Vector<SessionHistoryEntry> m_session_history;
Vector<JS::NonnullGCPtr<SessionHistoryEntry>> m_session_history;
// https://html.spec.whatwg.org/multipage/browsers.html#creator-url
Optional<AK::URL> m_creator_url;