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

LibWeb: Make WorkerNavigator GC-allocated

This commit is contained in:
Andreas Kling 2022-09-04 14:37:49 +02:00
parent 9da72cdaba
commit 2fe97fa8db
8 changed files with 51 additions and 14 deletions

View file

@ -6,18 +6,23 @@
#pragma once
#include <AK/RefCounted.h>
#include <LibWeb/Bindings/Wrappable.h>
#include <LibWeb/Forward.h>
#include <LibWeb/Bindings/PlatformObject.h>
namespace Web::HTML {
// FIXME: Add Mixin APIs from https://html.spec.whatwg.org/multipage/workers.html#the-workernavigator-object
class WorkerNavigator
: public RefCounted<WorkerNavigator>
, public Bindings::Wrappable {
class WorkerNavigator : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(WorkerNavigator, Bindings::PlatformObject);
public:
using WrapperType = Bindings::WorkerNavigatorWrapper;
static JS::NonnullGCPtr<WorkerNavigator> create(WorkerGlobalScope&);
virtual ~WorkerNavigator() override;
private:
explicit WorkerNavigator(WorkerGlobalScope&);
};
}
WRAPPER_HACK(WorkerNavigator, Web::HTML)