Bug 704230 - Use nsXREAppData instead of extracting and reading back in files. Temp workaround. r=blassey
authorDoug Turner <dougt@dougt.org>
Mon, 21 Nov 2011 11:40:10 -0800
changeset 82242 f67977dea071caf9ebd77bd32e9f3cb705e86755
parent 82241 3fcaee9224ce2f777c2915eaf90db4a928182b3e
child 82243 8ceaedf06a576d3f02365968aa5c3e2f86c38141
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs704230
milestone11.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 704230 - Use nsXREAppData instead of extracting and reading back in files. Temp workaround. r=blassey
toolkit/mozapps/update/nsUpdateService.js
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -682,28 +682,28 @@ function cleanupActiveUpdate() {
 
 /**
  * Gets the locale from the update.locale file for replacing %LOCALE% in the
  * update url. The update.locale file can be located in the application
  * directory or the GRE directory with preference given to it being located in
  * the application directory.
  */
 function getLocale() {
+
   if (gLocale)
     return gLocale;
 
   var localeFile = FileUtils.getFile(KEY_APPDIR, [FILE_UPDATE_LOCALE]);
   if (!localeFile.exists())
     localeFile = FileUtils.getFile(KEY_GRED, [FILE_UPDATE_LOCALE]);
 
-  if (!localeFile.exists())
-    throw Components.Exception(FILE_UPDATE_LOCALE + " file doesn't exist in " +
-                               "either the " + KEY_APPDIR + " or " + KEY_GRED +
-                               " directories", Cr.NS_ERROR_FILE_NOT_FOUND);
-
+  if (!localeFile.exists()) {
+    // XXX temp workaround.  see bug 704230
+    return "en-US";
+  }
   gLocale = readStringFromFile(localeFile);
   LOG("getLocale - getting locale from file: " + localeFile.path +
       ", locale: " + gLocale);
   return gLocale;
 }
 
 /**
  * Read the update channel from defaults only.  We do this to ensure that