Issue #1442 - Part 12a - Allow idle worker shutdown to begin for an opt-in WorkerHolder mode. https://bugzilla.mozilla.org/show_bug.cgi?id=1362444 Pre-requisite for Part 13.

This commit is contained in:
Brian Smith 2023-09-28 17:34:54 -05:00 • committed by roytam1
commit 41216b88f6
4 changed files with 30 additions and 6 deletions

View file

@ -8,8 +8,9 @@
BEGIN_WORKERS_NAMESPACE
WorkerHolder::WorkerHolder()
WorkerHolder::WorkerHolder(Behavior aBehavior)
: mWorkerPrivate(nullptr)
, mBehavior(aBehavior)
{
}
@ -44,6 +45,12 @@ WorkerHolder::ReleaseWorker()
ReleaseWorkerInternal();
}
WorkerHolder::Behavior
WorkerHolder::GetBehavior() const
{
return mBehavior;
}
void
WorkerHolder::ReleaseWorkerInternal()
{