mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:18:11 +00:00
LibWeb: Make WorkerNavigator GC-allocated
This commit is contained in:
parent
9da72cdaba
commit
2fe97fa8db
8 changed files with 51 additions and 14 deletions
25
Userland/Libraries/LibWeb/HTML/WorkerNavigator.cpp
Normal file
25
Userland/Libraries/LibWeb/HTML/WorkerNavigator.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/HTML/WorkerGlobalScope.h>
|
||||
#include <LibWeb/HTML/WorkerNavigator.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
JS::NonnullGCPtr<WorkerNavigator> WorkerNavigator::create(WorkerGlobalScope& global_scope)
|
||||
{
|
||||
return *global_scope.heap().allocate<WorkerNavigator>(global_scope.realm(), global_scope);
|
||||
}
|
||||
|
||||
WorkerNavigator::WorkerNavigator(WorkerGlobalScope& global_scope)
|
||||
: PlatformObject(global_scope.realm())
|
||||
{
|
||||
// FIXME: Set prototype once we can get to worker scope prototypes.
|
||||
}
|
||||
|
||||
WorkerNavigator::~WorkerNavigator() = default;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue