mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Use JS::Handle for page pointer in LoadRequest
Since we can't visit page pointer from LoadRequest we need to use JS::Handle to keep it alive.
This commit is contained in:
parent
6ac43274b2
commit
286ea068fc
Notes:
sideshowbarker
2024-07-17 01:12:07 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 286ea068fc
Pull-request: https://github.com/SerenityOS/serenity/pull/22252
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/shannonbooth
Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ public:
|
||||||
void start_timer() { m_load_timer.start(); }
|
void start_timer() { m_load_timer.start(); }
|
||||||
Duration load_time() const { return m_load_timer.elapsed_time(); }
|
Duration load_time() const { return m_load_timer.elapsed_time(); }
|
||||||
|
|
||||||
JS::GCPtr<Page> page() { return m_page; }
|
JS::GCPtr<Page> page() { return m_page.ptr(); }
|
||||||
void set_page(Page& page) { m_page = page; }
|
void set_page(Page& page) { m_page = page; }
|
||||||
|
|
||||||
unsigned hash() const
|
unsigned hash() const
|
||||||
|
@ -79,7 +79,7 @@ private:
|
||||||
HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> m_headers;
|
HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> m_headers;
|
||||||
ByteBuffer m_body;
|
ByteBuffer m_body;
|
||||||
Core::ElapsedTimer m_load_timer;
|
Core::ElapsedTimer m_load_timer;
|
||||||
JS::GCPtr<Page> m_page;
|
JS::Handle<Page> m_page;
|
||||||
bool m_main_resource { false };
|
bool m_main_resource { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue