diff options
Diffstat (limited to 'dom/workers/WorkerHolder.h')
-rw-r--r-- | dom/workers/WorkerHolder.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/dom/workers/WorkerHolder.h b/dom/workers/WorkerHolder.h index 050c6f8e20..d8f3927af7 100644 --- a/dom/workers/WorkerHolder.h +++ b/dom/workers/WorkerHolder.h @@ -73,7 +73,12 @@ class WorkerHolder public: NS_DECL_OWNINGTHREAD - WorkerHolder(); + enum Behavior { + AllowIdleShutdownStart, + PreventIdleShutdownStart, + }; + + explicit WorkerHolder(Behavior aBehavior = PreventIdleShutdownStart); virtual ~WorkerHolder(); bool HoldWorker(WorkerPrivate* aWorkerPrivate, Status aFailStatus); @@ -81,6 +86,8 @@ public: virtual bool Notify(Status aStatus) = 0; + Behavior GetBehavior() const; + protected: void ReleaseWorkerInternal(); @@ -88,6 +95,8 @@ protected: private: void AssertIsOwningThread() const; + + const Behavior mBehavior; }; END_WORKERS_NAMESPACE |