1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

LibWeb+LibJS: Use JS::GCPtr for pointers to GC-allocated objects

Fixes warnings found by LibJSGCVerifier
This commit is contained in:
Aliaksandr Kalenik 2023-12-11 12:23:04 +01:00 committed by Alexander Kalenik
parent ed97946975
commit 6ac43274b2
14 changed files with 31 additions and 31 deletions

View file

@ -43,7 +43,7 @@ public:
void start_timer() { m_load_timer.start(); }
Duration load_time() const { return m_load_timer.elapsed_time(); }
Optional<Page&>& page() { return m_page; }
JS::GCPtr<Page> page() { return m_page; }
void set_page(Page& page) { m_page = page; }
unsigned hash() const
@ -79,7 +79,7 @@ private:
HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> m_headers;
ByteBuffer m_body;
Core::ElapsedTimer m_load_timer;
Optional<Page&> m_page;
JS::GCPtr<Page> m_page;
bool m_main_resource { false };
};