bug 967735 - Check orientation type and convert appropiately if incorrect; r=wesj
authorMartyn Haigh <martyn.haigh@gmail.com>
Tue, 11 Feb 2014 23:42:12 -0800
changeset 186584 58ce2022d43b7b06d132c9198637b7e4eccc2635
parent 186583 e3b9b91bf89301747e76ad37818813e1b6d72061
child 186585 d6473daed318e48d4b2205e6ef986064f72c1426
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs967735
milestone30.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 967735 - Check orientation type and convert appropiately if incorrect; r=wesj
mobile/android/modules/WebappManager.jsm
--- a/mobile/android/modules/WebappManager.jsm
+++ b/mobile/android/modules/WebappManager.jsm
@@ -525,17 +525,21 @@ this.WebappManager = {
       }
     });
   },
 
   writeDefaultPrefs: function(aProfile, aManifest) {
       // build any app specific default prefs
       let prefs = [];
       if (aManifest.orientation) {
-        prefs.push({name:"app.orientation.default", value: aManifest.orientation.join(",") });
+        let orientation = aManifest.orientation;
+        if (Array.isArray(orientation)) {
+          orientation = orientation.join(",");
+        }
+        prefs.push({ name: "app.orientation.default", value: orientation });
       }
 
       // write them into the app profile
       let defaultPrefsFile = aProfile.clone();
       defaultPrefsFile.append(this.DEFAULT_PREFS_FILENAME);
       this._writeData(defaultPrefsFile, prefs);
   },