nsIAsyncShutdownClient

A client for a nsIAsyncShutdownBarrier.

Methods

addBlocker(aBlocker, aFileName, aLineNumber, aStack)

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.

Parameters

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++.

removeBlocker(aBlocker)

Remove a blocker.

Parameters

aBlocker A blocker previously added to this client through `addBlocker`. Noop if the blocker has never been added or has been removed already.

Attributes

name

The name of the barrier.

jsclient

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.