Interface nsIAsyncShutdownClientType

A client for a nsIAsyncShutdownBarrier.

Hierarchy

Properties

isClosed: boolean

Whether the client is still open for new blockers. When this is true it is too late to add new blockers and addBlocker will throw an exception.

jsclient: any

The JS implementation of the client.

It is strongly recommended that JS clients of this API use jsclient instead of the nsIAsyncShutdownClient. See AsyncShutdown.sys.mjs for more information on the JS version of this API.

name: string

The name of the barrier.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

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

    Throws

    If it's too late to add a blocker.

    See

    isClosed.

    Parameters

    • aBlocker: nsIAsyncShutdownBlocker

      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: string

      The filename of the callsite, as given by __FILE__.

    • aLineNumber: number

      The linenumber of the callsite, as given by __LINE__.

    • aStack: string

      Information on the stack that lead to this call. Generally empty when called from C++.

    Returns void

  • Remove a blocker.

    Parameters

    • aBlocker: nsIAsyncShutdownBlocker

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

    Returns void

Generated using TypeDoc