mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17: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
|
@ -22,6 +22,7 @@
|
|||
#include <LibGfx/Size.h>
|
||||
#include <LibGfx/StandardCursor.h>
|
||||
#include <LibIPC/Forward.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibWeb/CSS/PreferredColorScheme.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
|
@ -193,7 +194,9 @@ private:
|
|||
bool m_pdf_viewer_supported { false };
|
||||
};
|
||||
|
||||
class PageClient {
|
||||
class PageClient : public JS::Cell {
|
||||
JS_CELL(PageClient, JS::Cell);
|
||||
|
||||
public:
|
||||
virtual Page& page() = 0;
|
||||
virtual Page const& page() const = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue