Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Dispatch an event to this event target, but do not run it before delay milliseconds have passed. This function may be called from any thread.
NS_ERROR_INVALID_ARG Indicates that event is null.
NS_ERROR_UNEXPECTED Indicates that the thread is shutting down and has finished processing events, so this event would never run and has not been dispatched, or that delay is zero.
The alreadyAddrefed<> event to dispatch.
The delay (in ms) before running the event. If event does not rise to the top of the event queue before the delay has passed, it will be set aside to execute once the delay has passed. Otherwise, it will be executed immediately.
Version of Dispatch to expose to JS, which doesn't require an alreadyAddRefed<> (it will be converted to that internally)
NS_ERROR_INVALID_ARG Indicates that event is null.
NS_ERROR_UNEXPECTED Indicates that the thread is shutting down and has finished processing events, so this event would never run and has not been dispatched.
The (raw) event to dispatch.
The flags modifying event dispatch. The flags are described in detail below.
Dispatch an event to this event target. This function may be called from any thread, and it may be called re-entrantly.
NS_ERROR_INVALID_ARG Indicates that event is null.
NS_ERROR_UNEXPECTED Indicates that the thread is shutting down and has finished processing events, so this event would never run and has not been dispatched.
The alreadyAddRefed<> event to dispatch. NOTE that the event will be leaked if it fails to dispatch.
The flags modifying event dispatch. The flags are described in detail below.
Register an task to be run on this event target when it begins shutting down. Shutdown tasks may be run in any order, and this function may be called from any thread.
The event target may or may not continue accepting events during or after the shutdown task. The precise behaviour here depends on the event target.
NS_ERROR_INVALID_ARG Indicates that task is null.
NS_ERROR_NOT_IMPLEMENTED Indicates that this event target doesn't support shutdown tasks.
NS_ERROR_UNEXPECTED Indicates that the thread is already shutting down, and no longer accepting events.
The task to be registered to the target thread.
NOTE that unlike dispatch
, this will not leak the task if it fails.
Unregisters an task previously registered with registerShutdownTask. This function may be called from any thread.
NS_ERROR_INVALID_ARG Indicates that task is null.
NS_ERROR_NOT_IMPLEMENTED Indicates that this event target doesn't support shutdown tasks.
NS_ERROR_UNEXPECTED Indicates that the thread is already shutting down, and no longer accepting events, or that the shutdown task cannot be found.
The task previously registered with registerShutdownTask
Generated using TypeDoc
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.