Merge mozilla-central to mozilla-inbound
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 16 Jan 2015 15:14:41 +0100
changeset 224201 ac6623427298e49638a13b5902a16a0f5ce3a685
parent 224172 d8dcfe4ca9f128df09c9f81cd948b89fd4ff4d72 (current diff)
parent 224200 5438e3f7484802510eaff28a1364e97f492fae61 (diff)
child 224202 5b0f5677578a96c8a836433773e0ae6e9ca5e6ac
push id54150
push usercbook@mozilla.com
push dateFri, 16 Jan 2015 14:14:56 +0000
treeherdermozilla-inbound@ac6623427298 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone38.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
Merge mozilla-central to mozilla-inbound
--- a/b2g/components/B2GAppMigrator.js
+++ b/b2g/components/B2GAppMigrator.js
@@ -29,20 +29,22 @@ XPCOMUtils.defineLazyServiceGetter(this,
 function B2GAppMigrator() {
 }
 
 B2GAppMigrator.prototype = {
   classID:         Components.ID('{7211ece0-b458-4635-9afc-f8d7f376ee95}'),
   QueryInterface:  XPCOMUtils.generateQI([Ci.nsIObserver,
                                           Ci.nsISupportsWeakReference]),
   executeBrowserMigration: function() {
-    // The browser db name is hashed the same way everywhere, so it
-    // should be the same on all systems. We should be able to just
-    // hardcode it.
-    let browserDBFileName = "2959517650brreosw.sqlite";
+    if (DEBUG) debug("Executing Browser Migration");
+    // The browser db file and directory names are hashed the same way
+    // everywhere, so it should be the same on all systems. We should
+    // be able to just hardcode it.
+    let browserDBDirName = "2959517650brreosw";
+    let browserDBFileName = browserDBDirName + ".sqlite";
 
     // Storage directories need to be prefixed with the local id of
     // the app
     let browserLocalAppId = appsService.getAppLocalIdByManifestURL("app://browser.gaiamobile.org/manifest.webapp");
     let browserAppStorageDirName = browserLocalAppId + "+f+app+++browser.gaiamobile.org";
 
     // On the phone, the browser db will only be in the old IDB
     // directory, since it only existed up until v2.0. On desktop, it
@@ -52,29 +54,45 @@ B2GAppMigrator.prototype = {
     // create extra directories along the way if they don't already
     // exist.
     let browserDBFile = FileUtils.getDir(kIDBDirType,
                                          ["storage",
                                           "persistent",
                                           browserAppStorageDirName,
                                           "idb"], false, true);
     browserDBFile.append(browserDBFileName);
+    let browserDBDir = FileUtils.getDir(kIDBDirType,
+                                        ["storage",
+                                         "persistent",
+                                         browserAppStorageDirName,
+                                         "idb",
+                                         browserDBDirName
+                                        ], false, true);
 
     if (!browserDBFile.exists()) {
-      if (DEBUG) debug("Browser DB directory " + browserDBFile.path + " does not exist, trying profile location");
+      if (DEBUG) debug("Browser DB " + browserDBFile.path + " does not exist, trying profile location");
       browserDBFile = FileUtils.getDir(kProfileDirType,
                                         ["storage",
                                          "persistent",
                                          browserAppStorageDirName,
                                          "idb"], false, true);
       browserDBFile.append(browserDBFileName);
       if (!browserDBFile.exists()) {
-        if (DEBUG) debug("Browser DB directory " + browserDBFile.path + " does not exist. Cannot copy browser db.");
+        if (DEBUG) debug("Browser DB " + browserDBFile.path + " does not exist. Cannot copy browser db.");
         return;
       }
+      // If we have confirmed we have a DB file, we should also have a
+      // directory.
+      browserDBDir = FileUtils.getDir(kProfileDirType,
+                                      ["storage",
+                                       "persistent",
+                                       browserAppStorageDirName,
+                                       "idb",
+                                       browserDBDirName
+                                      ], false, true);
     }
 
     let systemLocalAppId = appsService.getAppLocalIdByManifestURL("app://system.gaiamobile.org/manifest.webapp");
     let systemAppStorageDirName = systemLocalAppId + "+f+app+++system.gaiamobile.org";
 
     // This check futureproofs the system DB storage directory. It
     // currently exists outside of the profile but will most likely
     // move into the profile at some point.
@@ -97,24 +115,30 @@ B2GAppMigrator.prototype = {
       }
     }
 
     if (DEBUG) {
       debug("Browser DB file exists, copying");
       debug("Browser local id: " + browserLocalAppId + "");
       debug("System local id: " + systemLocalAppId + "");
       debug("Browser DB file path: " + browserDBFile.path + "");
+      debug("Browser DB dir path: " + browserDBDir.path + "");
       debug("System DB directory path: " + systemDBDir.path + "");
     }
 
     try {
       browserDBFile.copyTo(systemDBDir, browserDBFileName);
     } catch (e) {
       debug("File copy caused error! " + e.name);
     }
+    try {
+      browserDBDir.copyTo(systemDBDir, browserDBDirName);
+    } catch (e) {
+      debug("Dir copy caused error! " + e.name);
+    }
     if (DEBUG) debug("Browser DB copied successfully");
   },
 
   observe: function(subject, topic, data) {
     switch (topic) {
       case kMigrationMessageName:
         this.executeBrowserMigration();
         break;
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="df362ace56338da8173d30d3e09e08c42c1accfa">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="0e94c080bee081a50aa2097527b0b40852f9143f">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
@@ -131,12 +131,12 @@
   <project name="android-development" path="development" remote="b2g" revision="dab55669da8f48b6e57df95d5af9f16b4a87b0b1"/>
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
   <project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="197cd9492b9fadaa915c5daf36ff557f8f4a8d1c"/>
   <project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
   <project name="libnfcemu" path="external/libnfcemu" remote="b2g" revision="125ccf9bd5986c7728ea44508b3e1d1185ac028b"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c5f8d282efe4a4e8b1e31a37300944e338e60e4f"/>
   <project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9f28c4faea3b2f01db227b2467b08aeba96d9bec"/>
-  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="f9c93ff3550ce324056d7c062e88fe45ca7dfd43"/>
+  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="0c557e136bb615923aad0f5c69da4e869523efc5"/>
   <project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
   <project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
 </manifest>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="df362ace56338da8173d30d3e09e08c42c1accfa">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
@@ -153,13 +153,13 @@
   <project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="2a1ded216a91bf62a72b1640cf01ab4998f37028"/>
   <project name="platform/hardware/qcom/display" path="hardware/qcom/display" revision="f8bec8a61dc0f2581fa72a31d4144084b47ef7cf"/>
   <project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="9883ea57b0668d8f60dba025d4522dfa69a1fbfa"/>
   <project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="a558dc844bf5144fc38603fd8f4df8d9557052a5"/>
   <project name="platform/hardware/qcom/wlan" path="hardware/qcom/wlan" revision="57ee1320ed7b4a1a1274d8f3f6c177cd6b9becb2"/>
   <project name="platform/hardware/ril" path="hardware/ril" revision="12b1977cc704b35f2e9db2bb423fa405348bc2f3"/>
   <project name="platform/system/bluetooth" path="system/bluetooth" revision="985bf15264d865fe7b9c5b45f61c451cbaafa43d"/>
   <project name="platform/system/core" path="system/core" revision="350eac5403124dacb2a5fd9e28ac290a59fc3b8e"/>
-  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="f9c93ff3550ce324056d7c062e88fe45ca7dfd43"/>
+  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="0c557e136bb615923aad0f5c69da4e869523efc5"/>
   <project name="platform/system/qcom" path="system/qcom" revision="63e3f6f176caad587d42bba4c16b66d953fb23c2"/>
   <project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="d8952a42771045fca73ec600e2b42a4c7129d723"/>
   <project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="018b44e52b2bac5d3631d559550e88a4b68c6e67"/>
 </manifest>
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="0e94c080bee081a50aa2097527b0b40852f9143f">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="e95b4ce22c825da44d14299e1190ea39a5260bde"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="471afab478649078ad7c75ec6b252481a59e19b8"/>
@@ -140,13 +140,13 @@
   <project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="5e110615212302c5d798a3c223dcee458817651c"/>
   <project name="platform/hardware/qcom/display" path="hardware/qcom/display" revision="fa9ffd47948eb24466de227e48fe9c4a7c5e7711"/>
   <project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="cd76b19aafd4229ccf83853d02faef8c51ca8b34"/>
   <project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="8a0d0b0d9889ef99c4c6317c810db4c09295f15a"/>
   <project name="platform/hardware/qcom/wlan" path="hardware/qcom/wlan" revision="2208fa3537ace873b8f9ec2355055761c79dfd5f"/>
   <project name="platform/hardware/ril" path="hardware/ril" revision="c4e2ac95907a5519a0e09f01a0d8e27fec101af0"/>
   <project name="platform/system/bluetooth" path="system/bluetooth" revision="e1eb226fa3ad3874ea7b63c56a9dc7012d7ff3c2"/>
   <project name="platform/system/core" path="system/core" revision="adc485d8755af6a61641d197de7cfef667722580"/>
-  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="f9c93ff3550ce324056d7c062e88fe45ca7dfd43"/>
+  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="0c557e136bb615923aad0f5c69da4e869523efc5"/>
   <project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
   <project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4ae5df252123591d5b941191790e7abed1bce5a4"/>
   <project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="ce18b47b4a4f93a581d672bbd5cb6d12fe796ca9"/>
 </manifest>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
         "git_revision": "", 
         "remote": "", 
         "branch": ""
     }, 
-    "revision": "1764121939b82f4ded4ca30761df48c3841028b0", 
+    "revision": "6de26e62ca7d84d4621406344b53eded6759f6a0", 
     "repo_path": "integration/gaia-central"
 }
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="df362ace56338da8173d30d3e09e08c42c1accfa">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform_bionic" path="bionic" remote="b2g" revision="1a2a32eda22ef2cd18f57f423a5e7b22a105a6f8"/>
   <project name="platform/bootable/recovery" path="bootable/recovery" revision="746bc48f34f5060f90801925dcdd964030c1ab6d"/>
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="df362ace56338da8173d30d3e09e08c42c1accfa">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform_bionic" path="bionic" remote="b2g" revision="1a2a32eda22ef2cd18f57f423a5e7b22a105a6f8"/>
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="0e94c080bee081a50aa2097527b0b40852f9143f">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
@@ -126,17 +126,17 @@
   <project name="platform/system/netd" path="system/netd" revision="56112dd7b811301b718d0643a82fd5cac9522073"/>
   <project name="platform/system/security" path="system/security" revision="f48ff68fedbcdc12b570b7699745abb6e7574907"/>
   <project name="platform/system/vold" path="system/vold" revision="8de05d4a52b5a91e7336e6baa4592f945a6ddbea"/>
   <default remote="caf" revision="refs/tags/android-4.3_r2.1" sync-j="4"/>
   <!-- Nexus 4 specific things -->
   <project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
   <project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
-  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="f9c93ff3550ce324056d7c062e88fe45ca7dfd43"/>
+  <project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="0c557e136bb615923aad0f5c69da4e869523efc5"/>
   <project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
   <project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
   <project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>
   <project name="platform/hardware/qcom/audio" path="hardware/qcom/audio" revision="b0a528d839cfd9d170d092fe3743b5252b4243a6"/>
   <project name="platform/hardware/qcom/bt" path="hardware/qcom/bt" revision="380945eaa249a2dbdde0daa4c8adb8ca325edba6"/>
   <project name="platform/hardware/qcom/display" path="hardware/qcom/display" revision="6f3b0272cefaffeaed2a7d2bb8f633059f163ddc"/>
   <project name="platform/hardware/qcom/keymaster" path="hardware/qcom/keymaster" revision="16da8262c997a5a0d797885788a64a0771b26910"/>
   <project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="689b476ba3eb46c34b81343295fe144a0e81a18e"/>
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="df362ace56338da8173d30d3e09e08c42c1accfa">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
-  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="401e981f51cf047292d101c785be8ec48bf75e8c"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5ae81fcc0d8568a50d0bf8491004bc9485b3a9ae"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="049c281ad212bf528b2af8fc246b0dd0c9f97415"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0024095d96fdccc076e511cfa7a4287cb1e0fd83"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -134,16 +134,17 @@
 @BINPATH@/components/browsercompsbase.xpt
 @BINPATH@/components/browser-element.xpt
 @BINPATH@/components/browser-feeds.xpt
 @BINPATH@/components/caps.xpt
 @BINPATH@/components/chardet.xpt
 @BINPATH@/components/chrome.xpt
 @BINPATH@/components/commandhandler.xpt
 @BINPATH@/components/commandlines.xpt
+@BINPATH@/components/compartments.xpt
 @BINPATH@/components/composer.xpt
 @BINPATH@/components/content_events.xpt
 @BINPATH@/components/content_html.xpt
 @BINPATH@/components/content_xslt.xpt
 @BINPATH@/components/cookie.xpt
 @BINPATH@/components/devtools_security.xpt
 @BINPATH@/components/directory.xpt
 @BINPATH@/components/diskspacewatcher.xpt
--- a/browser/devtools/webide/content/devicepreferences.js
+++ b/browser/devtools/webide/content/devicepreferences.js
@@ -291,28 +291,30 @@ function SearchPref(event) {
     var trs = document.getElementsByTagName("tr");
 
     for (let i = 0; i < trs.length; i++) {
       trs[i].classList.remove("hide");
     }
   }
 }
 
+let getAllPrefs; // Used by tests
 function BuildUI() {
   table = document.querySelector("table");
   let trs = table.querySelectorAll("tr:not(#add-custom-preference)");
 
   for (var i = 0; i < trs.length; i++) {
     table.removeChild(trs[i]);
   }
 
   if (AppManager.connection &&
       AppManager.connection.status == Connection.Status.CONNECTED &&
       AppManager.preferenceFront) {
-    AppManager.preferenceFront.getAllPrefs().then(json => {
+    getAllPrefs = AppManager.preferenceFront.getAllPrefs();
+    getAllPrefs.then(json => {
       let devicePrefs = Object.keys(json);
       devicePrefs.sort();
       for (let i = 0; i < devicePrefs.length; i++) {
         GenerateField(devicePrefs[i], json[devicePrefs[i]].value, json[devicePrefs[i]].hasUserValue);
       }
     });
   } else {
     CloseUI();
--- a/browser/devtools/webide/content/webide.js
+++ b/browser/devtools/webide/content/webide.js
@@ -287,28 +287,30 @@ let UI = {
     this._busyOperationDescription = operationDescription;
     this.setupBusyTimeout();
     this.busy();
     promise.then(() => {
       this.cancelBusyTimeout();
       this.unbusy();
     }, (e) => {
       let message;
-      if (e.error && e.message) {
+      if (e && e.error && e.message) {
         // Some errors come from fronts that are not based on protocol.js.
         // Errors are not translated to strings.
         message = operationDescription + " (" + e.error + "): " + e.message;
       } else {
         message = operationDescription + (e ? (": " + e) : "");
       }
       this.cancelBusyTimeout();
       let operationCanceled = e && e.canceled;
       if (!operationCanceled) {
         UI.reportError("error_operationFail", message);
-        console.error(e);
+        if (e) {
+          console.error(e);
+        }
       }
       this.unbusy();
     });
     return promise;
   },
 
   reportError: function(l10nProperty, ...l10nArgs) {
     let text;
@@ -434,18 +436,23 @@ let UI = {
         }
       }
     }
   },
 
   connectToRuntime: function(runtime) {
     let name = runtime.name;
     let promise = AppManager.connectToRuntime(runtime);
-    promise.then(() => this.initConnectionTelemetry());
-    return this.busyUntil(promise, "connecting to runtime " + name);
+    promise.then(() => this.initConnectionTelemetry())
+           .catch(() => {
+             // Empty rejection handler to silence uncaught rejection warnings
+             // |busyUntil| will listen for rejections.
+             // Bug 1121100 may find a better way to silence these.
+           });
+    return this.busyUntil(promise, "Connecting to " + name);
   },
 
   updateRuntimeButton: function() {
     let labelNode = document.querySelector("#runtime-panel-button > .panel-button-label");
     if (!AppManager.selectedRuntime) {
       labelNode.setAttribute("value", Strings.GetStringFromName("runtimeButton_label"));
     } else {
       let name = AppManager.selectedRuntime.name;
--- a/browser/devtools/webide/modules/app-manager.js
+++ b/browser/devtools/webide/modules/app-manager.js
@@ -88,22 +88,23 @@ let AppManager = exports.AppManager = {
       } else {
         text = Strings.GetStringFromName(l10nProperty);
       }
       console.error(text);
     }
   },
 
   onConnectionChanged: function() {
+    console.log("Connection status changed: " + this.connection.status);
+
     if (this.connection.status == Connection.Status.DISCONNECTED) {
       this.selectedRuntime = null;
     }
 
     if (this.connection.status != Connection.Status.CONNECTED) {
-      console.log("Connection status changed: " + this.connection.status);
       if (this._appsFront) {
         this._appsFront.off("install-progress", this.onInstallProgress);
         this._appsFront.unwatchApps();
         this._appsFront = null;
       }
       this._listTabsResponse = null;
     } else {
       this.connection.client.listTabs((response) => {
@@ -349,28 +350,25 @@ let AppManager = exports.AppManager = {
       let onConnectedOrDisconnected = () => {
         this.connection.off(Connection.Events.CONNECTED, onConnectedOrDisconnected);
         this.connection.off(Connection.Events.DISCONNECTED, onConnectedOrDisconnected);
         if (this.connection.status == Connection.Status.CONNECTED) {
           deferred.resolve();
         } else {
           deferred.reject();
         }
-      }
+      };
       this.connection.on(Connection.Events.CONNECTED, onConnectedOrDisconnected);
       this.connection.on(Connection.Events.DISCONNECTED, onConnectedOrDisconnected);
       try {
         // Reset the connection's state to defaults
         this.connection.resetOptions();
-        this.selectedRuntime.connect(this.connection).then(
-          () => {},
-          deferred.reject.bind(deferred));
+        deferred.resolve(this.selectedRuntime.connect(this.connection));
       } catch(e) {
-        console.error(e);
-        deferred.reject();
+        deferred.reject(e);
       }
     }, deferred.reject);
 
     // Record connection result in telemetry
     let logResult = result => {
       this._telemetry.log("DEVTOOLS_WEBIDE_CONNECTION_RESULT", result);
       if (runtime.type) {
         this._telemetry.log("DEVTOOLS_WEBIDE_" + runtime.type +
@@ -381,16 +379,20 @@ let AppManager = exports.AppManager = {
 
     // If successful, record connection time in telemetry
     deferred.promise.then(() => {
       const timerId = "DEVTOOLS_WEBIDE_CONNECTION_TIME_SECONDS";
       this._telemetry.startTimer(timerId);
       this.connection.once(Connection.Events.STATUS_CHANGED, () => {
         this._telemetry.stopTimer(timerId);
       });
+    }).catch(() => {
+      // Empty rejection handler to silence uncaught rejection warnings
+      // |connectToRuntime| caller should listen for rejections.
+      // Bug 1121100 may find a better way to silence these.
     });
 
     return deferred.promise;
   },
 
   isMainProcessDebuggable: function() {
     return this._listTabsResponse &&
            this._listTabsResponse.consoleActor;
--- a/browser/devtools/webide/modules/runtimes.js
+++ b/browser/devtools/webide/modules/runtimes.js
@@ -396,17 +396,17 @@ function DeprecatedUSBRuntime(id) {
 
 DeprecatedUSBRuntime.prototype = {
   type: RuntimeTypes.USB,
   get device() {
     return Devices.getByName(this._id);
   },
   connect: function(connection) {
     if (!this.device) {
-      return promise.reject("Can't find device: " + this.name);
+      return promise.reject(new Error("Can't find device: " + this.name));
     }
     return this.device.connect().then((port) => {
       connection.host = "localhost";
       connection.port = port;
       connection.connect();
     });
   },
   get id() {
@@ -440,17 +440,17 @@ function WiFiRuntime(deviceName) {
   this.deviceName = deviceName;
 }
 
 WiFiRuntime.prototype = {
   type: RuntimeTypes.WIFI,
   connect: function(connection) {
     let service = discovery.getRemoteService("devtools", this.deviceName);
     if (!service) {
-      return promise.reject("Can't find device: " + this.name);
+      return promise.reject(new Error("Can't find device: " + this.name));
     }
     connection.host = service.host;
     connection.port = service.port;
     connection.encryption = service.encryption;
     connection.connect();
     return promise.resolve();
   },
   get id() {
@@ -469,17 +469,17 @@ function SimulatorRuntime(name) {
 }
 
 SimulatorRuntime.prototype = {
   type: RuntimeTypes.SIMULATOR,
   connect: function(connection) {
     let port = ConnectionManager.getFreeTCPPort();
     let simulator = Simulator.getByName(this.name);
     if (!simulator || !simulator.launch) {
-      return promise.reject("Can't find simulator: " + this.name);
+      return promise.reject(new Error("Can't find simulator: " + this.name));
     }
     return simulator.launch({port: port}).then(() => {
       connection.host = "localhost";
       connection.port = port;
       connection.keepConnecting = true;
       connection.once(Connection.Events.DISCONNECTED, simulator.close);
       connection.connect();
     });
@@ -515,28 +515,28 @@ let gLocalRuntime = {
 // For testing use only
 exports._gLocalRuntime = gLocalRuntime;
 
 let gRemoteRuntime = {
   type: RuntimeTypes.REMOTE,
   connect: function(connection) {
     let win = Services.wm.getMostRecentWindow("devtools:webide");
     if (!win) {
-      return promise.reject();
+      return promise.reject(new Error("No WebIDE window found"));
     }
     let ret = {value: connection.host + ":" + connection.port};
     let title = Strings.GetStringFromName("remote_runtime_promptTitle");
     let message = Strings.GetStringFromName("remote_runtime_promptMessage");
     let ok = Services.prompt.prompt(win, title, message, ret, null, {});
     let [host,port] = ret.value.split(":");
     if (!ok) {
       return promise.reject({canceled: true});
     }
     if (!host || !port) {
-      return promise.reject();
+      return promise.reject(new Error("Invalid host or port"));
     }
     connection.host = host;
     connection.port = port;
     connection.connect();
     return promise.resolve();
   },
   get name() {
     return Strings.GetStringFromName("remote_runtime");
--- a/browser/devtools/webide/test/test_device_preferences.html
+++ b/browser/devtools/webide/test/test_device_preferences.html
@@ -41,16 +41,17 @@
 
           ok(!prefs.hasAttribute("disabled"), "device prefs cmd enabled");
 
           let deck = win.document.querySelector("#deck");
 
           win.Cmds.showDevicePrefs();
           is(deck.selectedPanel, prefIframe, "device preferences iframe selected");
 
+          yield prefIframe.contentWindow.getAllPrefs;
           yield nextTick();
 
           let doc = prefIframe.contentWindow.document;
           let fields = doc.querySelectorAll(".editable");
           let preference = "accessibility.blockautorefresh";
           let found = false;
 
           // Trigger existing field change
--- a/browser/devtools/webide/test/test_deviceinfo.html
+++ b/browser/devtools/webide/test/test_deviceinfo.html
@@ -44,17 +44,17 @@
           ok(!perm.hasAttribute("disabled"), "perm cmd enabled");
           ok(!info.hasAttribute("disabled"), "info cmd enabled");
 
           let deck = win.document.querySelector("#deck");
 
           win.Cmds.showRuntimeDetails();
           is(deck.selectedPanel, infoIframe, "info iframe selected");
 
-          yield infoIframe.contentWindow.getRawPermissionsTablePromise;
+          yield infoIframe.contentWindow.getDescriptionPromise;
 
           yield nextTick();
 
           // device info and permissions content is checked in other tests
           // We just test one value to make sure we get something
 
           let doc = infoIframe.contentWindow.document;
           let trs = doc.querySelectorAll("tr");
@@ -67,17 +67,17 @@
               is(val.textContent, Services.appinfo.ID, "appid has the right value");
             }
           }
           ok(found, "Found appid line");
 
           win.Cmds.showPermissionsTable();
           is(deck.selectedPanel, permIframe, "permission iframe selected");
 
-          yield infoIframe.contentWindow.getDescriptionPromise;
+          yield permIframe.contentWindow.getRawPermissionsTablePromise;
 
           yield nextTick();
 
           doc = permIframe.contentWindow.document;
           trs = doc.querySelectorAll(".line");
           found = false;
           for (let tr of trs) {
             let [name,v1,v2,v3] = tr.querySelectorAll("td");
--- a/browser/devtools/webide/test/test_telemetry.html
+++ b/browser/devtools/webide/test/test_telemetry.html
@@ -138,17 +138,17 @@
           ok(win.document.querySelector("window").className, "busy", "UI is busy");
           yield win.UI._busyPromise;
           is(Object.keys(DebuggerServer._connections).length, 1, "Connected");
         });
       }
 
       function connectToRuntime(win, type, index) {
         return Task.spawn(function*() {
-          yield startConnection(win, type, index);
+          startConnection(win, type, index);
           yield waitUntilConnected(win);
         });
       }
 
       function checkResults() {
         let result = Telemetry.prototype.telemetryInfo;
         for (let [histId, value] of Iterator(result)) {
           if (histId.endsWith("OPENED_PER_USER_FLAG")) {
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -170,16 +170,17 @@
 @RESPATH@/components/browser-element.xpt
 @RESPATH@/browser/components/browsercompsbase.xpt
 @RESPATH@/browser/components/browser-feeds.xpt
 @RESPATH@/browser/components/browsermodules.manifest
 @RESPATH@/components/caps.xpt
 @RESPATH@/components/chrome.xpt
 @RESPATH@/components/commandhandler.xpt
 @RESPATH@/components/commandlines.xpt
+@RESPATH@/components/compartments.xpt
 @RESPATH@/components/composer.xpt
 @RESPATH@/components/content_events.xpt
 @RESPATH@/components/content_html.xpt
 @RESPATH@/components/content_geckomediaplugins.xpt
 #ifdef MOZ_WEBRTC
 @RESPATH@/components/content_webrtc.xpt
 #endif
 @RESPATH@/components/content_xslt.xpt
--- a/dom/apps/PermissionsTable.jsm
+++ b/dom/apps/PermissionsTable.jsm
@@ -500,17 +500,17 @@ this.PermissionsTable =  { geolocation: 
                              app: DENY_ACTION,
                              trusted: DENY_ACTION,
                              privileged: DENY_ACTION,
                              certified: ALLOW_ACTION
                            },
                            "settings:wallpaper.image": {
                              app: DENY_ACTION,
                              trusted: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
+                             privileged: ALLOW_ACTION,
                              certified: ALLOW_ACTION,
                              access: ["read", "write"],
                              additional: ["settings-api"]
                            },
                            "engineering-mode": {
                              app: DENY_ACTION,
                              trusted: DENY_ACTION,
                              privileged: DENY_ACTION,
--- a/dom/bluetooth2/BluetoothPairingListener.cpp
+++ b/dom/bluetooth2/BluetoothPairingListener.cpp
@@ -87,28 +87,31 @@ BluetoothPairingListener::Notify(const B
   BluetoothValue value = aData.value();
   if (aData.name().EqualsLiteral("PairingRequest")) {
 
     MOZ_ASSERT(value.type() == BluetoothValue::TArrayOfBluetoothNamedValue);
 
     const InfallibleTArray<BluetoothNamedValue>& arr =
       value.get_ArrayOfBluetoothNamedValue();
 
-    MOZ_ASSERT(arr.Length() == 3 &&
+    MOZ_ASSERT(arr.Length() == 4 &&
                arr[0].value().type() == BluetoothValue::TnsString && // address
-               arr[1].value().type() == BluetoothValue::TnsString && // passkey
-               arr[2].value().type() == BluetoothValue::TnsString);  // type
+               arr[1].value().type() == BluetoothValue::TnsString && // name
+               arr[2].value().type() == BluetoothValue::TnsString && // passkey
+               arr[3].value().type() == BluetoothValue::TnsString);  // type
 
     nsString deviceAddress = arr[0].value().get_nsString();
-    nsString passkey = arr[1].value().get_nsString();
-    nsString type = arr[2].value().get_nsString();
+    nsString deviceName = arr[1].value().get_nsString();
+    nsString passkey = arr[2].value().get_nsString();
+    nsString type = arr[3].value().get_nsString();
 
-    // Create a temporary device with deviceAddress for searching
+    // Create a temporary device with deviceAddress and deviceName
     InfallibleTArray<BluetoothNamedValue> props;
     BT_APPEND_NAMED_VALUE(props, "Address", deviceAddress);
+    BT_APPEND_NAMED_VALUE(props, "Name", deviceName);
     nsRefPtr<BluetoothDevice> device =
       BluetoothDevice::Create(GetOwner(), props);
 
     // Notify pairing listener of pairing requests
     DispatchPairingEvent(device, passkey, type);
   } else {
     BT_WARNING("Not handling pairing listener signal: %s",
                NS_ConvertUTF16toUTF8(aData.name()).get());
--- a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp
+++ b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp
@@ -1495,16 +1495,17 @@ BluetoothServiceBluedroid::PinRequestNot
                                                   const nsAString& aBdName,
                                                   uint32_t aCod)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   InfallibleTArray<BluetoothNamedValue> propertiesArray;
 
   BT_APPEND_NAMED_VALUE(propertiesArray, "address", nsString(aRemoteBdAddr));
+  BT_APPEND_NAMED_VALUE(propertiesArray, "name", nsString(aBdName));
   BT_APPEND_NAMED_VALUE(propertiesArray, "passkey", EmptyString());
   BT_APPEND_NAMED_VALUE(propertiesArray, "type",
                         NS_LITERAL_STRING(PAIRING_REQ_TYPE_ENTERPINCODE));
 
   DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PairingRequest"),
                                    NS_LITERAL_STRING(KEY_PAIRING_LISTENER),
                                    BluetoothValue(propertiesArray)));
 }
@@ -1541,16 +1542,17 @@ BluetoothServiceBluedroid::SspRequestNot
       pairingType.AssignLiteral(PAIRING_REQ_TYPE_CONSENT);
       break;
     default:
       BT_WARNING("Unhandled SSP Bonding Variant: %d", aPairingVariant);
       return;
   }
 
   BT_APPEND_NAMED_VALUE(propertiesArray, "address", nsString(aRemoteBdAddr));
+  BT_APPEND_NAMED_VALUE(propertiesArray, "name", nsString(aBdName));
   BT_APPEND_NAMED_VALUE(propertiesArray, "passkey", passkey);
   BT_APPEND_NAMED_VALUE(propertiesArray, "type", pairingType);
 
   DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PairingRequest"),
                                    NS_LITERAL_STRING(KEY_PAIRING_LISTENER),
                                    BluetoothValue(propertiesArray)));
 }
 
--- a/dom/nfc/NfcContentHelper.js
+++ b/dom/nfc/NfcContentHelper.js
@@ -182,37 +182,16 @@ NfcContentHelper.prototype = {
     cpmm.sendAsyncMessage("NFC:Transceive", {
       requestId: requestId,
       sessionToken: sessionToken,
       technology: technology,
       command: command
     });
   },
 
-  connect: function connect(techType, sessionToken, callback) {
-    let requestId = callback.getCallbackId();
-    this._requestMap[requestId] = callback;
-
-    cpmm.sendAsyncMessage("NFC:Connect", {
-      requestId: requestId,
-      sessionToken: sessionToken,
-      techType: techType
-    });
-  },
-
-  close: function close(sessionToken, callback) {
-    let requestId = callback.getCallbackId();
-    this._requestMap[requestId] = callback;
-
-    cpmm.sendAsyncMessage("NFC:Close", {
-      requestId: requestId,
-      sessionToken: sessionToken
-    });
-  },
-
   sendFile: function sendFile(data, sessionToken, callback) {
     let requestId = callback.getCallbackId();
     this._requestMap[requestId] = callback;
 
     cpmm.sendAsyncMessage("NFC:SendFile", {
       requestId: requestId,
       sessionToken: sessionToken,
       blob: data.blob
@@ -279,31 +258,29 @@ NfcContentHelper.prototype = {
         this.handle(subject.key, subject.value);
       }
     }
   },
 
   // nsIMessageListener
   receiveMessage: function receiveMessage(message) {
     DEBUG && debug("Message received: " + JSON.stringify(message));
-    let result = message.json;
+    let result = message.data;
 
     switch (message.name) {
       case "NFC:ReadNDEFResponse":
         this.handleReadNDEFResponse(result);
         break;
       case "NFC:CheckP2PRegistrationResponse":
         this.handleCheckP2PRegistrationResponse(result);
         break;
       case "NFC:TransceiveResponse":
         this.handleTransceiveResponse(result);
         break;
-      case "NFC:ConnectResponse": // Fall through.
-      case "NFC:CloseResponse":
-      case "NFC:WriteNDEFResponse":
+      case "NFC:WriteNDEFResponse": // Fall through.
       case "NFC:MakeReadOnlyResponse":
       case "NFC:FormatResponse":
       case "NFC:NotifySendFileStatusResponse":
       case "NFC:ChangeRFStateResponse":
         this.handleGeneralResponse(result);
         break;
       case "NFC:DOMEvent":
         switch (result.event) {
@@ -350,17 +327,17 @@ NfcContentHelper.prototype = {
     switch (name) {
       case NFC.SETTING_NFC_DEBUG:
         DEBUG = result;
         updateDebug();
         break;
     }
   },
 
-  handleGeneralResponse: function handleReadNDEFResponse(result) {
+  handleGeneralResponse: function handleGeneralResponse(result) {
     let requestId = result.requestId;
     let callback = this._requestMap[requestId];
     if (!callback) {
       debug("not firing message " + result.type + " for id: " + requestId);
       return;
     }
     delete this._requestMap[requestId];
 
--- a/dom/nfc/gonk/Nfc.js
+++ b/dom/nfc/gonk/Nfc.js
@@ -56,18 +56,16 @@ const NFC_CID =
 
 const NFC_IPC_MSG_ENTRIES = [
   { permission: null,
     messages: ["NFC:AddEventListener",
                "NFC:QueryInfo"] },
 
   { permission: "nfc",
     messages: ["NFC:ReadNDEF",
-               "NFC:Connect",
-               "NFC:Close",
                "NFC:WriteNDEF",
                "NFC:MakeReadOnly",
                "NFC:Format",
                "NFC:Transceive"] },
 
   { permission: "nfc-share",
     messages: ["NFC:SendFile",
                "NFC:RegisterPeerReadyTarget",
@@ -509,19 +507,17 @@ Nfc.prototype = {
      case "ChangeRFStateResponse":
         this.sendNfcResponse(message);
 
         if (!message.errorMsg) {
           this.rfState = message.rfState;
           gMessageManager.onRFStateChange(this.rfState);
         }
         break;
-      case "ConnectResponse": // Fall through.
-      case "CloseResponse":
-      case "ReadNDEFResponse":
+      case "ReadNDEFResponse": // Fall through.
       case "MakeReadOnlyResponse":
       case "FormatResponse":
       case "TransceiveResponse":
       case "WriteNDEFResponse":
         this.sendNfcResponse(message);
         break;
       default:
         throw new Error("Don't know about this message type: " + message.type);
@@ -574,22 +570,16 @@ Nfc.prototype = {
         this.sendToNfcService("makeReadOnly", message.data);
         break;
       case "NFC:Format":
         this.sendToNfcService("format", message.data);
         break;
       case "NFC:Transceive":
         this.sendToNfcService("transceive", message.data);
         break;
-      case "NFC:Connect":
-        this.sendToNfcService("connect", message.data);
-        break;
-      case "NFC:Close":
-        this.sendToNfcService("close", message.data);
-        break;
       case "NFC:SendFile":
         // Chrome process is the arbitrator / mediator between
         // system app (content process) that issued nfc 'sendFile' operation
         // and system app that handles the system message :
         // 'nfc-manager-send-file'. System app subsequently handover's
         // the data to alternate carrier's (BT / WiFi) 'sendFile' interface.
 
         // Notify system app to initiate BT send file operation
--- a/dom/nfc/gonk/NfcGonkMessage.h
+++ b/dom/nfc/gonk/NfcGonkMessage.h
@@ -3,22 +3,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef NfcGonkMessage_h
 #define NfcGonkMessage_h
 
 namespace mozilla {
 
 #define NFCD_MAJOR_VERSION 1
-#define NFCD_MINOR_VERSION 19
+#define NFCD_MINOR_VERSION 20
 
 enum NfcRequest {
   ChangeRFStateReq = 0,
-  ConnectReq,
-  CloseReq,
   ReadNDEFReq,
   WriteNDEFReq,
   MakeReadOnlyReq,
   FormatReq,
   TransceiveReq,
 };
 
 enum NfcResponse {
--- a/dom/nfc/gonk/NfcMessageHandler.cpp
+++ b/dom/nfc/gonk/NfcMessageHandler.cpp
@@ -18,27 +18,23 @@ using namespace mozilla;
 using namespace mozilla::dom;
 
 static const char* kChangeRFStateRequest = "changeRFState";
 static const char* kReadNDEFRequest = "readNDEF";
 static const char* kWriteNDEFRequest = "writeNDEF";
 static const char* kMakeReadOnlyRequest = "makeReadOnly";
 static const char* kFormatRequest = "format";
 static const char* kTransceiveRequest = "transceive";
-static const char* kConnectRequest = "connect";
-static const char* kCloseRequest = "close";
 
 static const char* kChangeRFStateResponse = "ChangeRFStateResponse";
 static const char* kReadNDEFResponse = "ReadNDEFResponse";
 static const char* kWriteNDEFResponse = "WriteNDEFResponse";
 static const char* kMakeReadOnlyResponse = "MakeReadOnlyResponse";
 static const char* kFormatResponse = "FormatResponse";
 static const char* kTransceiveResponse = "TransceiveResponse";
-static const char* kConnectResponse = "ConnectResponse";
-static const char* kCloseResponse = "CloseResponse";
 
 static const char* kInitializedNotification = "InitializedNotification";
 static const char* kTechDiscoveredNotification = "TechDiscoveredNotification";
 static const char* kTechLostNotification = "TechLostNotification";
 static const char* kHCIEventTransactionNotification =
                      "HCIEventTransactionNotification";
 
 bool
@@ -58,22 +54,16 @@ NfcMessageHandler::Marshall(Parcel& aPar
     result = MakeReadOnlyRequest(aParcel, aOptions);
     mPendingReqQueue.AppendElement(NfcRequest::MakeReadOnlyReq);
   } else if (!strcmp(type, kFormatRequest)) {
     result = FormatRequest(aParcel, aOptions);
     mPendingReqQueue.AppendElement(NfcRequest::FormatReq);
   } else if (!strcmp(type, kTransceiveRequest)) {
     result = TransceiveRequest(aParcel, aOptions);
     mPendingReqQueue.AppendElement(NfcRequest::TransceiveReq);
-  } else if (!strcmp(type, kConnectRequest)) {
-    result = ConnectRequest(aParcel, aOptions);
-    mPendingReqQueue.AppendElement(NfcRequest::ConnectReq);
-  } else if (!strcmp(type, kCloseRequest)) {
-    result = CloseRequest(aParcel, aOptions);
-    mPendingReqQueue.AppendElement(NfcRequest::CloseReq);
   } else {
     result = false;
   }
 
   return result;
 }
 
 bool
@@ -129,22 +119,16 @@ NfcMessageHandler::GeneralResponse(const
       type = kWriteNDEFResponse;
       break;
     case NfcRequest::MakeReadOnlyReq:
       type = kMakeReadOnlyResponse;
       break;
     case NfcRequest::FormatReq:
       type = kFormatResponse;
       break;
-    case NfcRequest::ConnectReq:
-      type = kConnectResponse;
-      break;
-    case NfcRequest::CloseReq:
-      type = kCloseResponse;
-      break;
     default:
       NMH_LOG("Nfcd, unknown general response %d", pendingReq);
       return false;
   }
 
   aOptions.mType = NS_ConvertUTF8toUTF16(type);
   aOptions.mErrorCode = aParcel.readInt32();
   aOptions.mSessionId = aParcel.readInt32();
@@ -264,35 +248,16 @@ NfcMessageHandler::TransceiveRequest(Par
   void* data = aParcel.writeInplace(length);
   memcpy(data, aOptions.mCommand.Elements(), length);
 
   mRequestIdQueue.AppendElement(aOptions.mRequestId);
   return true;
 }
 
 bool
-NfcMessageHandler::ConnectRequest(Parcel& aParcel, const CommandOptions& aOptions)
-{
-  aParcel.writeInt32(NfcRequest::ConnectReq);
-  aParcel.writeInt32(aOptions.mSessionId);
-  aParcel.writeInt32(aOptions.mTechType);
-  mRequestIdQueue.AppendElement(aOptions.mRequestId);
-  return true;
-}
-
-bool
-NfcMessageHandler::CloseRequest(Parcel& aParcel, const CommandOptions& aOptions)
-{
-  aParcel.writeInt32(NfcRequest::CloseReq);
-  aParcel.writeInt32(aOptions.mSessionId);
-  mRequestIdQueue.AppendElement(aOptions.mRequestId);
-  return true;
-}
-
-bool
 NfcMessageHandler::InitializeNotification(const Parcel& aParcel, EventOptions& aOptions)
 {
   aOptions.mType = NS_ConvertUTF8toUTF16(kInitializedNotification);
   aOptions.mStatus = aParcel.readInt32();
   aOptions.mMajorVersion = aParcel.readInt32();
   aOptions.mMinorVersion = aParcel.readInt32();
 
   if (aOptions.mMajorVersion != NFCD_MAJOR_VERSION ||
--- a/dom/nfc/gonk/NfcMessageHandler.h
+++ b/dom/nfc/gonk/NfcMessageHandler.h
@@ -29,18 +29,16 @@ private:
   bool ChangeRFStateResponse(const android::Parcel& aParcel, EventOptions& aOptions);
   bool ReadNDEFRequest(android::Parcel& aParcel, const CommandOptions& options);
   bool ReadNDEFResponse(const android::Parcel& aParcel, EventOptions& aOptions);
   bool WriteNDEFRequest(android::Parcel& aParcel, const CommandOptions& options);
   bool MakeReadOnlyRequest(android::Parcel& aParcel, const CommandOptions& options);
   bool FormatRequest(android::Parcel& aParcel, const CommandOptions& options);
   bool TransceiveRequest(android::Parcel& aParcel, const CommandOptions& options);
   bool TransceiveResponse(const android::Parcel& aParcel, EventOptions& aOptions);
-  bool ConnectRequest(android::Parcel& aParcel, const CommandOptions& options);
-  bool CloseRequest(android::Parcel& aParcel, const CommandOptions& options);
 
   bool InitializeNotification(const android::Parcel& aParcel, EventOptions& aOptions);
   bool TechDiscoveredNotification(const android::Parcel& aParcel, EventOptions& aOptions);
   bool TechLostNotification(const android::Parcel& aParcel, EventOptions& aOptions);
   bool HCIEventTransactionNotification(const android::Parcel& aParcel, EventOptions& aOptions);
 
   bool ReadNDEFMessage(const android::Parcel& aParcel, EventOptions& aOptions);
   bool WriteNDEFMessage(android::Parcel& aParcel, const CommandOptions& aOptions);
--- a/dom/nfc/nsINfcContentHelper.idl
+++ b/dom/nfc/nsINfcContentHelper.idl
@@ -97,17 +97,17 @@ interface nsINfcRequestCallback : nsISup
 
   void notifySuccessWithNDEFRecords(in nsIVariant records);
 
   void notifySuccessWithByteArray(in nsIVariant array);
 
   void notifyError(in DOMString errorMsg);
 };
 
-[scriptable, uuid(0f8aae32-9920-491e-a197-8995941d54df)]
+[scriptable, uuid(b5194ae8-d5d5-482f-a73f-dd0d755a1972)]
 interface nsINfcContentHelper : nsISupports
 {
   void init(in nsIDOMWindow window);
 
   /**
    * Read current NDEF data on the tag.
    *
    * @param sessionToken
@@ -176,44 +176,16 @@ interface nsINfcContentHelper : nsISuppo
    *
    */
   void transceive(in DOMString sessionToken,
                   in DOMString technology,
                   in nsIVariant command,
                   in nsINfcRequestCallback callback);
 
   /**
-   * Enable I/O operations to the tag
-   *
-   * @param techType
-   *        Interface to a technology in a Tag
-   *
-   * @param sessionToken
-   *        Current token
-   *
-   * @param callback
-   *        Called when request is finished
-   */
-  void connect(in unsigned long techType,
-               in DOMString sessionToken,
-               in nsINfcRequestCallback callback);
-
-  /**
-   * Disable I/O operations to the tag
-   *
-   * @param sessionToken
-   *        Current token
-   *
-   * @param callback
-   *        Called when request is finished
-   */
-  void close(in DOMString sessionToken,
-             in nsINfcRequestCallback callback);
-
-  /**
    * Get current RF state.
    */
   DOMString queryRFState();
 
   /**
    * Initiate send file operation.
    *
    * @param blob
--- a/dom/nfc/nsNfc.js
+++ b/dom/nfc/nsNfc.js
@@ -20,22 +20,24 @@ Cu.import("resource://gre/modules/Servic
 Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this,
                                    "appsService",
                                    "@mozilla.org/AppsService;1",
                                    "nsIAppsService");
 
 function NfcCallback(aWindow) {
+  this._window = aWindow;
   this.initDOMRequestHelper(aWindow, null);
   this._createPromise();
 }
 NfcCallback.prototype = {
   __proto__: DOMRequestIpcHelper.prototype,
 
+  _window: null,
   promise: null,
   _requestId: null,
 
   _createPromise: function _createPromise() {
     this.promise = this.createPromise((aResolve, aReject) => {
       this._requestId = btoa(this.getPromiseResolverId({
         resolve: aResolve,
         reject: aReject
@@ -75,27 +77,27 @@ NfcCallback.prototype = {
   },
 
   notifySuccessWithByteArray: function notifySuccessWithByteArray(aArray) {
     let resolver = this.takePromiseResolver(atob(this._requestId));
     if (!resolver) {
       debug("can not find promise resolver for id: " + this._requestId);
       return;
     }
-    resolver.resolve(aArray);
+    resolver.resolve(Cu.cloneInto(aArray, this._window));
   },
 
   notifyError: function notifyError(aErrorMsg) {
     let resolver = this.takePromiseResolver(atob(this._requestId));
     if (!resolver) {
       debug("can not find promise resolver for id: " + this._requestId +
            ", errormsg: " + aErrorMsg);
       return;
     }
-    resolver.reject(aErrorMsg);
+    resolver.reject(new this._window.Error(aErrorMsg));
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
                                          Ci.nsIObserver,
                                          Ci.nsINfcRequestCallback]),
 };
 
 // Should be mapped to the NFCTagType defined in MozNFCTag.webidl.
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -119,16 +119,17 @@
 @BINPATH@/components/browsercompsbase.xpt
 @BINPATH@/components/browser-element.xpt
 @BINPATH@/components/browser-feeds.xpt
 @BINPATH@/components/caps.xpt
 @BINPATH@/components/chardet.xpt
 @BINPATH@/components/chrome.xpt
 @BINPATH@/components/commandhandler.xpt
 @BINPATH@/components/commandlines.xpt
+@BINPATH@/components/compartments.xpt
 @BINPATH@/components/composer.xpt
 @BINPATH@/components/content_events.xpt
 @BINPATH@/components/content_geckomediaplugins.xpt
 @BINPATH@/components/content_html.xpt
 @BINPATH@/components/content_webrtc.xpt
 @BINPATH@/components/content_xslt.xpt
 @BINPATH@/components/cookie.xpt
 @BINPATH@/components/directory.xpt
--- a/toolkit/components/downloads/nsDownloadManager.cpp
+++ b/toolkit/components/downloads/nsDownloadManager.cpp
@@ -2519,19 +2519,19 @@ nsDownloadManager::Observe(nsISupports *
     if (!mCurrentPrivateDownloads.Count())
       return NS_OK;
 
     nsCOMPtr<nsISupportsPRBool> cancelDownloads = do_QueryInterface(aSubject, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     ConfirmCancelDownloads(mCurrentPrivateDownloads.Count(), cancelDownloads,
                            MOZ_UTF16("leavePrivateBrowsingCancelDownloadsAlertTitle"),
-                           MOZ_UTF16("leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple"),
-                           MOZ_UTF16("leavePrivateBrowsingWindowsCancelDownloadsAlertMsg"),
-                           MOZ_UTF16("dontLeavePrivateBrowsingButton"));
+                           MOZ_UTF16("leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple2"),
+                           MOZ_UTF16("leavePrivateBrowsingWindowsCancelDownloadsAlertMsg2"),
+                           MOZ_UTF16("dontLeavePrivateBrowsingButton2"));
   }
 
   return NS_OK;
 }
 
 void
 nsDownloadManager::ConfirmCancelDownloads(int32_t aCount,
                                           nsISupportsPRBool *aCancelDownloads,
--- a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm
@@ -35,17 +35,17 @@ const kStringBundleUrl =
   "chrome://mozapps/locale/downloads/downloads.properties";
 
 const kStringsRequiringFormatting = {
   fileExecutableSecurityWarning: true,
   cancelDownloadsOKTextMultiple: true,
   quitCancelDownloadsAlertMsgMultiple: true,
   quitCancelDownloadsAlertMsgMacMultiple: true,
   offlineCancelDownloadsAlertMsgMultiple: true,
-  leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple: true
+  leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple2: true
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 //// DownloadUIHelper
 
 /**
  * Provides functions to handle status and messages in the user interface.
  */
@@ -227,19 +227,19 @@ this.DownloadPrompter.prototype = {
         message = aDownloadsCount > 1
                   ? s.offlineCancelDownloadsAlertMsgMultiple(aDownloadsCount)
                   : s.offlineCancelDownloadsAlertMsg;
         cancelButton = s.dontGoOfflineButton;
         break;
       case this.ON_LEAVE_PRIVATE_BROWSING:
         title = s.leavePrivateBrowsingCancelDownloadsAlertTitle;
         message = aDownloadsCount > 1
-                  ? s.leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple(aDownloadsCount)
-                  : s.leavePrivateBrowsingWindowsCancelDownloadsAlertMsg;
-        cancelButton = s.dontLeavePrivateBrowsingButton;
+                  ? s.leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple2(aDownloadsCount)
+                  : s.leavePrivateBrowsingWindowsCancelDownloadsAlertMsg2;
+        cancelButton = s.dontLeavePrivateBrowsingButton2;
         break;
     }
 
     let rv = this._prompter.confirmEx(title, message, buttonFlags, okButton,
                                       cancelButton, null, null, {});
     return (rv == 1);
   }
 };
--- a/toolkit/locales/en-US/chrome/mozapps/downloads/downloads.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/downloads/downloads.properties
@@ -27,25 +27,24 @@ quitCancelDownloadsAlertTitle=Cancel All
 quitCancelDownloadsAlertMsg=If you exit now, 1 download will be canceled. Are you sure you want to exit?
 quitCancelDownloadsAlertMsgMultiple=If you exit now, %S downloads will be canceled. Are you sure you want to exit?
 quitCancelDownloadsAlertMsgMac=If you quit now, 1 download will be canceled. Are you sure you want to quit?
 quitCancelDownloadsAlertMsgMacMultiple=If you quit now, %S downloads will be canceled. Are you sure you want to quit?
 offlineCancelDownloadsAlertTitle=Cancel All Downloads?
 offlineCancelDownloadsAlertMsg=If you go offline now, 1 download will be canceled. Are you sure you want to go offline?
 offlineCancelDownloadsAlertMsgMultiple=If you go offline now, %S downloads will be canceled. Are you sure you want to go offline?
 leavePrivateBrowsingCancelDownloadsAlertTitle=Cancel All Downloads?
-leavePrivateBrowsingWindowsCancelDownloadsAlertMsg=If you close all Private Browsing windows now, 1 download will be canceled. Are you sure you want to leave the Private Browsing mode?
-leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple=If you close all Private Browsing windows now, %S downloads will be canceled. Are you sure you want to leave the Private Browsing mode?
+leavePrivateBrowsingWindowsCancelDownloadsAlertMsg2=If you close all Private Browsing windows now, 1 download will be canceled. Are you sure you want to leave Private Browsing?
+leavePrivateBrowsingWindowsCancelDownloadsAlertMsgMultiple2=If you close all Private Browsing windows now, %S downloads will be canceled. Are you sure you want to leave Private Browsing?
 cancelDownloadsOKText=Cancel 1 Download
 cancelDownloadsOKTextMultiple=Cancel %S Downloads
 dontQuitButtonWin=Don't Exit
 dontQuitButtonMac=Don't Quit
 dontGoOfflineButton=Stay Online
-dontEnterPrivateBrowsingButton=Don't Enter the Private Browsing Mode
-dontLeavePrivateBrowsingButton=Stay in Private Browsing Mode
+dontLeavePrivateBrowsingButton2=Stay in Private Browsing
 downloadsCompleteTitle=Downloads Complete
 downloadsCompleteMsg=All files have finished downloading. 
 
 # LOCALIZATION NOTE (infiniteRate):
 # If download speed is a JavaScript Infinity value, this phrase is used
 infiniteRate=Really fast
 
 # LOCALIZATION NOTE (statusFormat3): — is the "em dash" (long dash)