summaryrefslogtreecommitdiffstats
path: root/dom/workers/WorkerRunnable.h
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-05 13:04:44 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-07-05 13:04:44 +0200
commita80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca (patch)
tree24d69034f60ed1f6bf79cccfbbe05f10c26238ff /dom/workers/WorkerRunnable.h
parentc3916ca1a0164dcb7742360a43d7ab36a80907fc (diff)
downloadUXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.tar
UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.tar.gz
UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.tar.lz
UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.tar.xz
UXP-a80267e9e88b3dcebf7f8f1f6f10931a99ddf2ca.zip
Bug 604026 - Sync event loops in workers should be created only if compatible with the worker shutdown status
Diffstat (limited to 'dom/workers/WorkerRunnable.h')
-rw-r--r--dom/workers/WorkerRunnable.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/dom/workers/WorkerRunnable.h b/dom/workers/WorkerRunnable.h
index c65060f44..8249a8053 100644
--- a/dom/workers/WorkerRunnable.h
+++ b/dom/workers/WorkerRunnable.h
@@ -401,9 +401,12 @@ protected:
public:
// Dispatch the runnable to the main thread. If dispatch to main thread
- // fails, or if the worker is shut down while dispatching, an error will be
- // reported on aRv. In that case the error MUST be propagated out to script.
- void Dispatch(ErrorResult& aRv);
+ // fails, or if the worker is in a state equal or greater of aFailStatus, an
+ // error will be reported on aRv. Normally you want to use 'Terminating' for
+ // aFailStatus, except if you want an infallible runnable. In this case, use
+ // 'Killing'.
+ // In that case the error MUST be propagated out to script.
+ void Dispatch(Status aFailStatus, ErrorResult& aRv);
private:
NS_IMETHOD Run() override;