Interface nsIAppStartupType

Hierarchy

Properties

automaticSafeModeNecessary: boolean

Startup Crash Detection

Keeps track of application startup begining and success using flags to determine whether the application is crashing on startup. When the number of crashes crosses the acceptable threshold, safe mode or other repair procedures are performed. Whether automatic safe mode is necessary at this time. This gets set in trackStartupCrashBegin.

See

trackStartupCrashBegin

interrupted: boolean

True if startup was interrupted by an interactive prompt.

restarting: boolean

True if the application is being restarted

secondsSinceLastOSRestart: int64_t

The number of seconds since the OS was last rebooted

showedPreXULSkeletonUI: bool

Whether or not we showed the startup skeleton UI.

shuttingDown: boolean

True if the application is in the process of shutting down. This is functionally equivalent to the C++ call AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownConfirmed); (which is the preferred way of checking for shutdown in C++).

startingUp: boolean

True if the application is in the process of starting up.

Startup is complete once all observers of final-ui-startup have returned.

wasRestarted: boolean

True if this is the startup following restart, i.e. if the application was restarted using quit(eRestart*).

wasSilentlyStarted: boolean

True if this is the startup following a silent restart, i.e. if the application was restarted using quit(eSilently*), or if the application was started with the "silentmode" command line flag.

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

  • Wrapper for shutdown notifications that informs the terminator before we notify other observers. Calls MaybeFastShutdown. This function is supposed to be used only from some (xpcshell) tests explicitely dealing with shutdown.

    Parameters

    • aPhase: nsIAppStartup_IDLShutdownPhase

      The shutdown phase we want to advance to. Please note, that we cannot go back to earlier phases or abort shutdown once it started.

    Returns void

  • Create the hidden window.

    Returns void

  • Run a new instance of this app with a specified profile

    See

    nsIAppStartup::quit

    Parameters

    • aProfile: nsIToolkitProfile

      The profile we want to use.

    Returns void

  • Destroys the hidden window. This will have no effect if the hidden window has not yet been created.

    Returns void

  • Mark the startup as completed.

    Called at the end of startup by nsAppRunner.

    Returns void

  • There are situations where all application windows will be closed but we don't want to take this as a signal to quit the app. Bracket the code where the last window could close with these.

    Returns void

  • Returns void

  • Returns an object with main, process, firstPaint, sessionRestored properties. Properties may not be available depending on platform or application

    Returns any

  • Check if we entered or passed a specific shutdown phase.

    Returns

    true if we are in or beyond the given phase.

    Parameters

    • aPhase: nsIAppStartup_IDLShutdownPhase

      The shutdown phase we want to check.

    Returns bool

  • Exit the event loop, and shut down the app.

    Returns

    false if the shutdown was cancelled due to the presence of a hidden window or if the user disallowed a window to be closed.

    Parameters

    • aMode: uint32_t

      This parameter modifies how the app is shutdown, and it is constructed from the constants defined above.

    • aExitCode: int32_t

      The exit code to return from the process. The precise code returned by the process may vary depending on the platform. Only values 0-255 should generally be used. If not specified an exit code of 0 will be used.

    Returns bool

  • Restart the application in safe mode

    See

    nsIAppStartup::quit

    Parameters

    • aQuitMode: uint32_t

      This parameter modifies how the app is shutdown.

    Returns void

  • Runs an application event loop: normally the main event pump which defines the lifetime of the application. If there are no windows open and no outstanding calls to enterLastWindowClosingSurvivalArea this method will exit immediately.

    Return Code

    NS_SUCCESS_RESTART_APP This return code indicates that the application should be restarted because quit was called with the eRestart flag.

    Returns void

  • If the last startup crashed then increment a counter. Set a flag so on next startup we can detect whether TrackStartupCrashEnd was called (and therefore the application crashed).

    Returns

    whether safe mode is necessary

    Returns bool

  • We have succesfully started without crashing. Clear flags that were tracking past crashes.

    Returns void

Generated using TypeDoc