Bug 604026 - Sync event loops in workers should be created only if compatible with the worker shutdown status

This commit is contained in:
janekptacijarabaci 2018-07-05 13:04:44 +02:00 • committed by Roy Tam
commit 98546534b0
17 changed files with 102 additions and 56 deletions

View file

@ -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;