mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
LibWeb: Make Web::PageClient GC-allocated
This is a first step towards simplifying the ownership model of Web::Page. Soon Web::Page will store its WebClient as a NonnullGCPtr to help solve lifetime issues of the client being destroyed before the page.
This commit is contained in:
parent
5c0cd0f484
commit
6e6f3a9a8f
11 changed files with 45 additions and 17 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <AK/Function.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <WebContent/Forward.h>
|
||||
|
||||
namespace WebContent {
|
||||
|
@ -34,7 +35,7 @@ private:
|
|||
explicit PageHost(ConnectionFromClient&);
|
||||
|
||||
ConnectionFromClient& m_client;
|
||||
HashMap<u64, NonnullOwnPtr<PageClient>> m_pages;
|
||||
HashMap<u64, JS::Handle<PageClient>> m_pages;
|
||||
u64 m_next_id { 0 };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue