diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js
index 762e0703cfa..c4e167be6b7 100644
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -258,7 +258,7 @@ const gXPInstallObserver = {
label: gNavigatorBundle.getString("addonInstallRestartButton"),
accessKey: gNavigatorBundle.getString("addonInstallRestartButton.accesskey"),
callback: function() {
- Application.restart();
+ BrowserUtils.restartApplication();
}
};
}
@@ -374,7 +374,7 @@ var LightWeightThemeWebInstaller = {
label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"),
accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"),
callback: function () {
- Application.restart();
+ BrowserUtils.restartApplication();
}
};
diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
index 57822c9790b..fb8563658f3 100644
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -3924,8 +3924,8 @@
- Application.console.log("enterTabbedMode is an obsolete method and " +
- "will be removed in a future release.");
+ Services.console.logStringMessage("enterTabbedMode is an obsolete method and " +
+ "will be removed in a future release.");
true
diff --git a/browser/fuel/fuelApplication.js b/browser/fuel/fuelApplication.js
index 132df0684ea..cf8c8e64fbc 100644
--- a/browser/fuel/fuelApplication.js
+++ b/browser/fuel/fuelApplication.js
@@ -6,6 +6,8 @@ const Ci = Components.interfaces;
const Cc = Components.classes;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
+ "resource://gre/modules/Deprecated.jsm");
const APPLICATION_CID = Components.ID("fe74cf80-aa2d-11db-abbd-0800200c9a66");
const APPLICATION_CONTRACTID = "@mozilla.org/fuel/application;1";
@@ -734,6 +736,9 @@ var ApplicationFactory = {
//=================================================
// Application constructor
function Application() {
+ Deprecated.warning("FUEL is deprecated, you should use the add-on SDK instead.",
+ "https://developer.mozilla.org/Add-ons/SDK/");
+
this.initToolkitHelpers();
}
diff --git a/toolkit/modules/BrowserUtils.jsm b/toolkit/modules/BrowserUtils.jsm
index be4ac724e87..342c2e0be45 100644
--- a/toolkit/modules/BrowserUtils.jsm
+++ b/toolkit/modules/BrowserUtils.jsm
@@ -22,6 +22,21 @@ this.BrowserUtils = {
dump("\n");
},
+ /**
+ * restartApplication: Restarts the application, keeping it in
+ * safe mode if it is already in safe mode.
+ */
+ restartApplication: function() {
+ let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
+ .getService(Ci.nsIAppStartup);
+ //if already in safe mode restart in safe mode
+ if (Services.appinfo.inSafeMode) {
+ appStartup.restartInSafeMode(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
+ return;
+ }
+ appStartup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
+ },
+
/**
* urlSecurityCheck: JavaScript wrapper for checkLoadURIWithPrincipal
* and checkLoadURIStrWithPrincipal.