Bug 689966 - Pref are initialized twice because of reference to nonexistent element [r=wesj]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 28 Sep 2011 17:29:08 -0700
changeset 78433 7cc26b83a57c5d6386128830116438ecf522596f
parent 78432 6032f7c15af8ba7c56bcfc174a2d6424d9aa7dfc
child 78434 0ae3e1279d98493b4b4b644e26360dabc7443e34
push id506
push userclegnitto@mozilla.com
push dateWed, 09 Nov 2011 02:03:18 +0000
treeherdermozilla-aurora@63587fc7bb93 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs689966
milestone10.0a1
Bug 689966 - Pref are initialized twice because of reference to nonexistent element [r=wesj]
mobile/chrome/content/preferences.js
--- a/mobile/chrome/content/preferences.js
+++ b/mobile/chrome/content/preferences.js
@@ -32,17 +32,16 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 var PreferencesView = {
   _currentLocale: null,
-  _languages: null,
   _msg: null,
 
   _messageActions: function pv__messageActions(aData) {
     if (aData == "prefs-restart-app") {
       // Notify all windows that an application quit has been requested
       var cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
       Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
 
@@ -88,21 +87,20 @@ var PreferencesView = {
     if (this._msg) {
       let notification = this._msg.getNotificationWithValue("restart-app");
       if (notification)
         notification.close();
     }
   },
 
   delayedInit: function pv__delayedInit() {
-    if (this._languages)
+    if (this._msg)
       return;
 
     this._msg = document.getElementById("prefs-messages");
-    this._languages = document.getElementById("prefs-languages");
     this._loadLocales();
 
     this._loadHomePage();
 
     MasterPasswordUI.updatePreference();
     WeaveGlue.init();
 
     Services.prefs.addObserver("general.useragent.locale", this, false);