Interface nsIRequestContextServiceType

The nsIRequestContextService is how anyone gets access to a request context when they haven't been explicitly given a strong reference to an existing one. It is responsible for creating and handing out strong references to nsIRequestContexts, but only keeps weak references itself. The shared request context will go away once no one else is keeping a reference to it. If you ask for a request context that has no one else holding a reference to it, you'll get a brand new request context. Anyone who asks for the same request context while you're holding a reference will get a reference to the same request context you have.

Hierarchy

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

  • Get an existing request context from its ID

    Parameters

    • id: number

    Returns nsIRequestContext

  • Shorthand to get request context from a load group

    Parameters

    • lg: nsILoadGroup

    Returns nsIRequestContext

  • Create a new request context

    Returns nsIRequestContext

  • Remove an existing request context from its ID

    Parameters

    • id: number

    Returns void

Generated using TypeDoc