WebContent+WebWorker: Add calls to JS_{DECLARE,DEFINE}_ALLOCATOR()

This commit is contained in:
Matthew Olsson 2024-04-06 10:16:18 -07:00 committed by Andreas Kling
parent 31341b280a
commit 97b343f696
6 changed files with 9 additions and 0 deletions

View file

@ -15,6 +15,8 @@
namespace WebContent {
JS_DEFINE_ALLOCATOR(ConsoleGlobalEnvironmentExtensions);
ConsoleGlobalEnvironmentExtensions::ConsoleGlobalEnvironmentExtensions(JS::Realm& realm, Web::HTML::Window& window)
: Object(realm, nullptr)
, m_window_object(window)

View file

@ -15,6 +15,7 @@ namespace WebContent {
class ConsoleGlobalEnvironmentExtensions final : public JS::Object {
JS_OBJECT(ConsoleGlobalEnvironmentExtensions, JS::Object);
JS_DECLARE_ALLOCATOR(ConsoleGlobalEnvironmentExtensions);
public:
ConsoleGlobalEnvironmentExtensions(JS::Realm&, Web::HTML::Window&);

View file

@ -39,6 +39,8 @@ namespace WebContent {
static bool s_use_gpu_painter = false;
JS_DEFINE_ALLOCATOR(PageClient);
void PageClient::set_use_gpu_painter()
{
s_use_gpu_painter = true;

View file

@ -24,6 +24,7 @@ namespace WebContent {
class PageClient final : public Web::PageClient {
JS_CELL(PageClient, Web::PageClient);
JS_DECLARE_ALLOCATOR(PageClient);
public:
static JS::NonnullGCPtr<PageClient> create(JS::VM& vm, PageHost& page_host, u64 id);

View file

@ -11,6 +11,8 @@
namespace WebWorker {
JS_DEFINE_ALLOCATOR(PageHost);
JS::NonnullGCPtr<PageHost> PageHost::create(JS::VM& vm, ConnectionFromClient& client)
{
return vm.heap().allocate_without_realm<PageHost>(client);

View file

@ -15,6 +15,7 @@ namespace WebWorker {
class PageHost final : public Web::PageClient {
JS_CELL(PageHost, Web::PageClient);
JS_DECLARE_ALLOCATOR(PageHost);
public:
static JS::NonnullGCPtr<PageHost> create(JS::VM& vm, ConnectionFromClient& client);