Bug 894188 - "resetSupported is not defined" in safe mode dialog. r=jaws
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Mon, 15 Jul 2013 21:09:00 -0700
changeset 138615 135d3870f6545a4c2e22b653bc1f3ad4af4bb9b8
parent 138614 b2006b48cb54bc03647e34d497471511766039c0
child 138616 556a557c7276b15deb36e92e35d402b677a6e4e2
push id31047
push usermozilla@noorenberghe.ca
push dateTue, 16 Jul 2013 04:23:11 +0000
treeherdermozilla-inbound@556a557c7276 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs894188
milestone25.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 894188 - "resetSupported is not defined" in safe mode dialog. r=jaws
browser/base/content/safeMode.js
--- a/browser/base/content/safeMode.js
+++ b/browser/base/content/safeMode.js
@@ -4,16 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 let Cc = Components.classes;
 let Ci = Components.interfaces;
 let Cu = Components.utils;
 
 const appStartup = Services.startup;
 
+Cu.import("resource://gre/modules/ResetProfile.jsm");
+
 let defaultToReset = false;
 
 function restartApp() {
   appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);
 }
 
 function resetProfile() {
   // Set the reset profile environment variable.
@@ -64,23 +66,23 @@ function onExtra1() {
   return false;
 }
 
 function onLoad() {
   let dialog = document.documentElement;
   if (appStartup.automaticSafeModeNecessary) {
     document.getElementById("autoSafeMode").hidden = false;
     document.getElementById("safeMode").hidden = true;
-    if (resetSupported()) {
+    if (ResetProfile.resetSupported()) {
       populateResetPane("resetProfileItems");
       document.getElementById("resetProfile").hidden = false;
     } else {
       // Hide the reset button is it's not supported.
       document.documentElement.getButton("extra1").hidden = true;
     }
   } else {
-    if (!resetSupported()) {
+    if (!ResetProfile.resetSupported()) {
       // Hide the reset button and text if it's not supported.
       document.documentElement.getButton("extra1").hidden = true;
       document.getElementById("resetProfileInstead").hidden = true;
     }
   }
 }