Bug 882142 - Add an interface attribute to determine if the app is restarting. r=jimm
authorBrian R. Bondy <netzen@gmail.com>
Tue, 10 Sep 2013 10:24:56 -0400
changeset 159260 282aa46c82d145a91c9cbc227f59950cc28ebfc2
parent 159259 42411ca90ef300c5e80fd43896d78de974e2f2f2
child 159261 a51560342d14604aa7505211e42c749eac77b9e4
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs882142
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 882142 - Add an interface attribute to determine if the app is restarting. r=jimm
toolkit/components/startup/nsAppStartup.cpp
toolkit/components/startup/public/nsIAppStartup.idl
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -511,16 +511,23 @@ nsAppStartup::ExitLastWindowClosingSurvi
 NS_IMETHODIMP
 nsAppStartup::GetShuttingDown(bool *aResult)
 {
   *aResult = mShuttingDown;
   return NS_OK;
 }
 
 NS_IMETHODIMP
+nsAppStartup::GetRestarting(bool *aResult)
+{
+  *aResult = mRestart;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
 nsAppStartup::SetInterrupted(bool aInterrupted)
 {
   mInterrupted = aInterrupted;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAppStartup::GetInterrupted(bool *aInterrupted)
--- a/toolkit/components/startup/public/nsIAppStartup.idl
+++ b/toolkit/components/startup/public/nsIAppStartup.idl
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsICmdLineService;
 
-[scriptable, uuid(2b51b67f-6f05-4145-b37e-7369bbc92b19)]
+[scriptable, uuid(380618f8-479a-435b-b58e-7398ab937531)]
 interface nsIAppStartup : nsISupports
 {
     /**
      * Create the hidden window.
      */
     void createHiddenWindow();
 
     /**
@@ -130,16 +130,21 @@ interface nsIAppStartup : nsISupports
      */
     void quit(in uint32_t aMode);
 
     /**
      * True if the application is in the process of shutting down.
      */
     readonly attribute boolean shuttingDown;
 
+    /**
+     * True if the application is being restarted
+     */
+    readonly attribute boolean restarting;
+
     /** 
      * Returns an object with main, process, firstPaint, sessionRestored properties.
      * Properties may not be available depending on platform or application
      */
     [implicit_jscontext] jsval getStartupInfo();
 
     /**
      * True if startup was interrupted by an interactive prompt.