1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37: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

@ -42,7 +42,7 @@ public:
JS::NonnullGCPtr<WorkerGlobalScope> self() const { return *this; }
JS::NonnullGCPtr<WorkerLocation> location() const;
NonnullRefPtr<WorkerNavigator const> navigator() const;
JS::NonnullGCPtr<WorkerNavigator> navigator() const;
DOM::ExceptionOr<void> import_scripts(Vector<String> urls);
#undef __ENUMERATE
@ -74,12 +74,14 @@ protected:
explicit WorkerGlobalScope(JS::Realm&);
private:
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(Cell::Visitor&) override;
JS::GCPtr<WorkerLocation> m_location;
// FIXME: Implement WorkerNavigator according to the spec
NonnullRefPtr<WorkerNavigator> m_navigator;
JS::GCPtr<WorkerNavigator> m_navigator;
// FIXME: Add all these internal slots