A client for a nsIAsyncShutdownBarrier.
Add a blocker.
After a blocker has been added with addBlocker, if it is not
removed with removeBlocker, this will, by design, eventually
CAUSE A CRASH.
Calling addBlocker once nsIAsyncShutdownBarrier::wait() has been
called on the owning barrier returns an error.
| aBlocker | The blocker to add. Once nsIAsyncShutdownBarrier::wait() has been called, it will not call its `aOnReady` callback until all blockers have been removed, each by a call to `removeBlocker`. |
| aFileName | The filename of the callsite, as given by `__FILE__`. |
| aLineNumber | The linenumber of the callsite, as given by `__LINE__`. |
| aStack | Information on the stack that lead to this call. Generally empty when called from C++. |
Remove a blocker.
| aBlocker | A blocker previously added to this client through `addBlocker`. Noop if the blocker has never been added or has been removed already. |
The name of the barrier.
The JS implementation of the client.
It is strongly recommended that JS clients of this API use
jsclient instead of the nsIAsyncShutdownClient. See
AsyncShutdown.jsm for more information on the JS version of
this API.