Merge m-c to mozilla-inbound
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 19 Oct 2015 11:40:29 +0200
changeset 303527 fa2108dc17027f6298502c0b52d7ad2dcd8c7441
parent 303526 9eb54c6df8010f528b06a4a029907d5aacd86055 (current diff)
parent 303447 1a157155a4fe0074b3d03b54fe9e466472c2cd56 (diff)
child 303528 5f89883da0b4dc7388627a8479fa638a615076b9
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone44.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 m-c to mozilla-inbound
browser/themes/windows/reload-stop-go-preWin10.png
browser/themes/windows/reload-stop-go-preWin10@2x.png
browser/themes/windows/urlbar-history-dropmarker-preWin10.png
browser/themes/windows/urlbar-history-dropmarker-preWin10@2x.png
devtools/client/jsonview/css/dark-theme.css
devtools/client/jsonview/css/light-theme.css
--- a/b2g/chrome/content/devtools/hud.js
+++ b/b2g/chrome/content/devtools/hud.js
@@ -31,17 +31,17 @@ XPCOMUtils.defineLazyGetter(this, 'Perfo
 });
 
 XPCOMUtils.defineLazyGetter(this, 'MemoryFront', function() {
   return devtools.require('devtools/server/actors/memory').MemoryFront;
 });
 
 Cu.import('resource://gre/modules/Frames.jsm');
 
-var _telemetryDebug = true;
+var _telemetryDebug = false;
 
 function telemetryDebug(...args) {
   if (_telemetryDebug) {
     args.unshift('[AdvancedTelemetry]');
     console.log(...args);
   }
 }
 
@@ -103,18 +103,18 @@ var developerHUD = {
     for (let frame of appFrames) {
       this.trackFrame(frame);
     }
 
     SettingsListener.observe('hud.logging', this._logging, enabled => {
       this._logging = enabled;
     });
 
-    SettingsListener.observe('debug.performance_data.advanced_telemetry', this._telemetry, enabled => {
-      this._telemetry = enabled;
+    SettingsListener.observe('metrics.selectedMetrics.level', "", level => {
+      this._telemetry = (level === 'Enhanced');
     });
   },
 
   uninit() {
     if (!this._client) {
       return;
     }
 
--- a/b2g/config/aries/sources.xml
+++ b/b2g/config/aries/sources.xml
@@ -10,20 +10,20 @@
   <!--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="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
@@ -101,17 +101,17 @@
   <project name="platform/external/webrtc" path="external/webrtc" revision="446452f84e9cc4c75d8e80f6f05e24793397a19d"/>
   <project name="platform/external/yaffs2" path="external/yaffs2" revision="a2cff2275e1b501ff478b03757d6e4f05fddc2db"/>
   <project name="platform/external/zlib" path="external/zlib" revision="6eb3570ff8fa71bd83bb375b4bf09804c6089fed"/>
   <project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="dbbe673145107e99883f62bafd70c5f43f11065c"/>
   <project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="f0c3b4edf597c40aae4ea311575f39c8bcf203df"/>
   <project name="platform/libcore" path="libcore" revision="baf7d8068dd501cfa338d3a8b1b87216d6ce0571"/>
   <project name="platform/libnativehelper" path="libnativehelper" revision="50c4430e32849530ced32680fd6ee98963b3f7ac"/>
   <project name="platform/ndk" path="ndk" revision="e58ef003be4306bb53a8c11331146f39e4eab31f"/>
-  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="23404f05422c6bf3c39573325a4f4909167671b4"/>
+  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="88fe75533255e99261c96cb497dcbd99820b7a3a"/>
   <project name="platform/prebuilts/ndk" path="prebuilts/ndk" revision="c792f0bd9fff7aea2887c60bbb3a9bbdb534ffa3"/>
   <project name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="69d524e80cdf3981006627c65ac85f3a871238a3"/>
   <project name="platform/prebuilts/tools" path="prebuilts/tools" revision="5a48c04c4bb5f079bc757e29864a42427378e051"/>
   <project name="platform_system_bluetoothd" path="system/bluetoothd" remote="b2g" revision="07a49d1f7a7a0a1e7d70fef353c2700434ffdc5c"/>
   <project name="platform/system/extras" path="system/extras" revision="576f57b6510de59c08568b53c0fb60588be8689e"/>
   <project name="platform_system_libfdio" path="system/libfdio" remote="b2g" revision="34adfb400e031f3dd3353d92413572db5e3a7376"/>
   <project name="platform/system/netd" path="system/netd" revision="a6531f7befb49b1c81bc0de7e51c5482b308e1c5"/>
   <project name="platform/system/security" path="system/security" revision="ee8068b9e7bfb2770635062fc9c2035be2142bd8"/>
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -10,20 +10,20 @@
   <!--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="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
@@ -106,17 +106,17 @@
   <project name="platform/frameworks/native" path="frameworks/native" revision="8d54940d9bdad8fec3208ff58ddab590be9fe0d4"/>
   <project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="dbbe673145107e99883f62bafd70c5f43f11065c"/>
   <project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="aac6c4bb59a6577c97cbda68699829b507b7490d"/>
   <project name="platform/hardware/libhardware" path="hardware/libhardware" revision="3d07a67010709194ca0e1ef40acf34ff8aff31ca"/>
   <project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="68b0c269fd1889f47ecfb9119c05281e9b6db0af"/>
   <project name="platform/libcore" path="libcore" revision="e195beab082c09217318fc19250caeaf4c1bd800"/>
   <project name="platform/libnativehelper" path="libnativehelper" revision="feeb36c2bd4adfe285f98f5de92e0f3771b2c115"/>
   <project name="platform/ndk" path="ndk" revision="e58ef003be4306bb53a8c11331146f39e4eab31f"/>
-  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="23404f05422c6bf3c39573325a4f4909167671b4"/>
+  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="88fe75533255e99261c96cb497dcbd99820b7a3a"/>
   <project name="platform/prebuilts/ndk" path="prebuilts/ndk" revision="c792f0bd9fff7aea2887c60bbb3a9bbdb534ffa3"/>
   <project name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="cfcef469537869947abb9aa1d656774cc2678d4c"/>
   <project name="platform/prebuilts/tools" path="prebuilts/tools" revision="5a48c04c4bb5f079bc757e29864a42427378e051"/>
   <project name="platform_system_bluetoothd" path="system/bluetoothd" remote="b2g" revision="07a49d1f7a7a0a1e7d70fef353c2700434ffdc5c"/>
   <project name="platform/system/extras" path="system/extras" revision="10e78a05252b3de785f88c2d0b9ea8a428009c50"/>
   <project name="platform/system/media" path="system/media" revision="188b3e51e0a2ce1e16dc8067edef7be3d2365ad9"/>
   <project name="platform_system_libfdio" path="system/libfdio" remote="b2g" revision="34adfb400e031f3dd3353d92413572db5e3a7376"/>
   <project name="platform/system/netd" path="system/netd" revision="3ae56364946d4a5bf5a5f83f12f9a45a30398e33"/>
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,18 +14,18 @@
   <!--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="1b0db93fb6b870b03467aff50d6419771ba0d88c">
     <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="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
   <project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,18 +12,18 @@
   <!--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="660169a3d7e034a892359e39135e8c2785a6ad6f">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <!-- 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"/>
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="9025e50b9d29b3cabbbb21e1dd94d0d13121a17e"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,19 +10,19 @@
   <!--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="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
@@ -105,17 +105,17 @@
   <project name="platform/frameworks/native" path="frameworks/native" revision="2176649bcda07ff82ba6e83f3b5ee8b80f2c5cb1"/>
   <project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="7a2d17bd2190556c9c804721ad7b19d45948bb1f"/>
   <project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="eb6077f10ae6255a72337124188f0e08dcd10e3e"/>
   <project name="platform/hardware/libhardware" path="hardware/libhardware" revision="3b80c725cea54132df05d208930d91e00d19f999"/>
   <project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="01f436c51dc68aec7cc1c85fda6e6792b2a95066"/>
   <project name="platform/libcore" path="libcore" revision="9877ade9617bb0db6e59aa2a54719a9bc92600f3"/>
   <project name="platform/libnativehelper" path="libnativehelper" revision="46c96ace65eb1ccab05bf15b9bf8e53e443039af"/>
   <project name="platform/ndk" path="ndk" revision="cb5519af32ae7b4a9c334913a612462ecd04c5d0"/>
-  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="23404f05422c6bf3c39573325a4f4909167671b4"/>
+  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="88fe75533255e99261c96cb497dcbd99820b7a3a"/>
   <project name="platform/prebuilts/ndk" path="prebuilts/ndk" revision="6aa61f8557a22039a30b42b7f283996381fd625d"/>
   <project name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="b562b01c93de9578d5db537b6a602a38e1aaa0ce"/>
   <project name="platform/prebuilts/tools" path="prebuilts/tools" revision="387f03e815f57d536dd922706db1622bddba8d81"/>
   <project name="platform_system_bluetoothd" path="system/bluetoothd" remote="b2g" revision="07a49d1f7a7a0a1e7d70fef353c2700434ffdc5c"/>
   <project name="platform/system/extras" path="system/extras" revision="5356165f67f4a81c2ef28671c13697f1657590df"/>
   <project name="platform/system/media" path="system/media" revision="be0e2fe59a8043fa5200f75697df9220a99abe9d"/>
   <project name="platform_system_libfdio" path="system/libfdio" remote="b2g" revision="34adfb400e031f3dd3353d92413572db5e3a7376"/>
   <project name="platform/system/netd" path="system/netd" revision="36704b0da24debcab8090156568ac236315036bb"/>
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -10,19 +10,19 @@
   <!--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="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <!-- Stock Android things -->
   <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,18 +14,18 @@
   <!--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="1b0db93fb6b870b03467aff50d6419771ba0d88c">
     <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="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
   <project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -10,20 +10,20 @@
   <!--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="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
@@ -100,17 +100,17 @@
   <project name="platform/external/webrtc" path="external/webrtc" revision="446452f84e9cc4c75d8e80f6f05e24793397a19d"/>
   <project name="platform/external/yaffs2" path="external/yaffs2" revision="a2cff2275e1b501ff478b03757d6e4f05fddc2db"/>
   <project name="platform/external/zlib" path="external/zlib" revision="6eb3570ff8fa71bd83bb375b4bf09804c6089fed"/>
   <project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="dbbe673145107e99883f62bafd70c5f43f11065c"/>
   <project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="f0c3b4edf597c40aae4ea311575f39c8bcf203df"/>
   <project name="platform/libcore" path="libcore" revision="baf7d8068dd501cfa338d3a8b1b87216d6ce0571"/>
   <project name="platform/libnativehelper" path="libnativehelper" revision="50c4430e32849530ced32680fd6ee98963b3f7ac"/>
   <project name="platform/ndk" path="ndk" revision="e58ef003be4306bb53a8c11331146f39e4eab31f"/>
-  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="23404f05422c6bf3c39573325a4f4909167671b4"/>
+  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="88fe75533255e99261c96cb497dcbd99820b7a3a"/>
   <project name="platform/prebuilts/ndk" path="prebuilts/ndk" revision="c792f0bd9fff7aea2887c60bbb3a9bbdb534ffa3"/>
   <project name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="69d524e80cdf3981006627c65ac85f3a871238a3"/>
   <project name="platform/prebuilts/tools" path="prebuilts/tools" revision="5a48c04c4bb5f079bc757e29864a42427378e051"/>
   <project name="platform_system_bluetoothd" path="system/bluetoothd" remote="b2g" revision="07a49d1f7a7a0a1e7d70fef353c2700434ffdc5c"/>
   <project name="platform/system/extras" path="system/extras" revision="576f57b6510de59c08568b53c0fb60588be8689e"/>
   <project name="platform_system_libfdio" path="system/libfdio" remote="b2g" revision="34adfb400e031f3dd3353d92413572db5e3a7376"/>
   <project name="platform/system/netd" path="system/netd" revision="a6531f7befb49b1c81bc0de7e51c5482b308e1c5"/>
   <project name="platform/system/security" path="system/security" revision="ee8068b9e7bfb2770635062fc9c2035be2142bd8"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
-        "git_revision": "f75a7e01912cee313fed92ff2089586f507b2ba5", 
+        "git_revision": "f75bd584aca0a751a5bed115800250faa8412927", 
         "remote": "https://git.mozilla.org/releases/gaia.git", 
         "branch": ""
     }, 
-    "revision": "f51f8770b9665f44e57e9e09faee2b967a80abf1", 
+    "revision": "8c3fb9e6ae490d957278e80817c0735241b11146", 
     "repo_path": "integration/gaia-central"
 }
--- a/b2g/config/nexus-4-kk/sources.xml
+++ b/b2g/config/nexus-4-kk/sources.xml
@@ -10,20 +10,20 @@
   <!--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="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
@@ -106,17 +106,17 @@
   <project name="platform/frameworks/native" path="frameworks/native" revision="2176649bcda07ff82ba6e83f3b5ee8b80f2c5cb1"/>
   <project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="7a2d17bd2190556c9c804721ad7b19d45948bb1f"/>
   <project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="eb6077f10ae6255a72337124188f0e08dcd10e3e"/>
   <project name="platform/hardware/libhardware" path="hardware/libhardware" revision="3b80c725cea54132df05d208930d91e00d19f999"/>
   <project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="01f436c51dc68aec7cc1c85fda6e6792b2a95066"/>
   <project name="platform/libcore" path="libcore" revision="9877ade9617bb0db6e59aa2a54719a9bc92600f3"/>
   <project name="platform/libnativehelper" path="libnativehelper" revision="46c96ace65eb1ccab05bf15b9bf8e53e443039af"/>
   <project name="platform/ndk" path="ndk" revision="cb5519af32ae7b4a9c334913a612462ecd04c5d0"/>
-  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="23404f05422c6bf3c39573325a4f4909167671b4"/>
+  <project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="88fe75533255e99261c96cb497dcbd99820b7a3a"/>
   <project name="platform/prebuilts/ndk" path="prebuilts/ndk" revision="6aa61f8557a22039a30b42b7f283996381fd625d"/>
   <project name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="b562b01c93de9578d5db537b6a602a38e1aaa0ce"/>
   <project name="platform/prebuilts/tools" path="prebuilts/tools" revision="387f03e815f57d536dd922706db1622bddba8d81"/>
   <project name="platform_system_bluetoothd" path="system/bluetoothd" remote="b2g" revision="07a49d1f7a7a0a1e7d70fef353c2700434ffdc5c"/>
   <project name="platform/system/extras" path="system/extras" revision="5356165f67f4a81c2ef28671c13697f1657590df"/>
   <project name="platform/system/media" path="system/media" revision="be0e2fe59a8043fa5200f75697df9220a99abe9d"/>
   <project name="platform_system_libfdio" path="system/libfdio" remote="b2g" revision="34adfb400e031f3dd3353d92413572db5e3a7376"/>
   <project name="platform/system/netd" path="system/netd" revision="36704b0da24debcab8090156568ac236315036bb"/>
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -13,18 +13,18 @@
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="660169a3d7e034a892359e39135e8c2785a6ad6f">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <!-- 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"/>
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="9025e50b9d29b3cabbbb21e1dd94d0d13121a17e"/>
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -10,20 +10,20 @@
   <!--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="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75a7e01912cee313fed92ff2089586f507b2ba5"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f75bd584aca0a751a5bed115800250faa8412927"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="7938df689aa87769fad3f2cf9097fb4ecb106a43"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="31a7849fe9a8b743d6f5e5facc212f0ef9d57499"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
   <!-- Stock Android things -->
   <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
--- a/browser/components/extensions/ext-tabs.js
+++ b/browser/components/extensions/ext-tabs.js
@@ -488,16 +488,20 @@ extensions.registerAPI((extension, conte
         if ("frameId" in connectInfo) {
           recipient.frameId = connectInfo.frameId;
         }
         return context.messenger.connect(mm, name, recipient);
       },
 
       sendMessage: function(tabId, message, options, responseCallback) {
         let tab = TabManager.getTab(tabId);
+        if (!tab) {
+          // ignore sendMessage to non existent tab id
+          return;
+        }
         let mm = tab.linkedBrowser.messageManager;
 
         let recipient = {extensionId: extension.id};
         if (options && "frameId" in options) {
           recipient.frameId = options.frameId;
         }
         return context.messenger.sendMessage(mm, message, recipient, responseCallback);
       },
--- a/browser/components/extensions/test/browser/browser.ini
+++ b/browser/components/extensions/test/browser/browser.ini
@@ -8,11 +8,12 @@ support-files =
 [browser_ext_currentWindow.js]
 [browser_ext_browserAction_simple.js]
 [browser_ext_browserAction_icon.js]
 [browser_ext_contextMenus.js]
 [browser_ext_getViews.js]
 [browser_ext_tabs_executeScript.js]
 [browser_ext_tabs_query.js]
 [browser_ext_tabs_update.js]
+[browser_ext_tabs_sendMessage.js]
 [browser_ext_windows_update.js]
 [browser_ext_contentscript_connect.js]
 [browser_ext_tab_runtimeConnect.js]
new file mode 100644
--- /dev/null
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_sendMessage.js
@@ -0,0 +1,31 @@
+add_task(function* tabsSendMessageNoExceptionOnNonExistentTab() {
+  let extension = ExtensionTestUtils.loadExtension({
+    manifest: {
+      "permissions": ["tabs"]
+    },
+
+    background: function() {
+      chrome.tabs.create({ url: "about:robots"}, function (tab) {
+        var exception;
+        try {
+          browser.tabs.sendMessage(tab.id, "message");
+          browser.tabs.sendMessage(tab.id + 100, "message");
+        } catch(e) {
+          exception = e;
+        }
+
+        browser.test.assertEq(undefined, exception, "no exception should be raised on tabs.sendMessage to unexistent tabs");
+        chrome.tabs.remove(tab.id, function() {
+          browser.test.notifyPass("tabs.sendMessage");
+        })
+      })
+    },
+  });
+
+  yield Promise.all([
+    extension.startup(),
+    extension.awaitFinish("tabs.sendMessage")
+  ]);
+
+  yield extension.unload();
+});
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -59,18 +59,18 @@ browser.jar:
   skin/classic/browser/Privacy-16-XP.png
   skin/classic/browser/privatebrowsing-mask-tabstrip.png
   skin/classic/browser/privatebrowsing-mask-tabstrip-XPVista7.png
   skin/classic/browser/privatebrowsing-mask-titlebar.png
   skin/classic/browser/privatebrowsing-mask-titlebar-XPVista7.png
   skin/classic/browser/privatebrowsing-mask-titlebar-XPVista7-tall.png
   skin/classic/browser/reload-stop-go.png
   skin/classic/browser/reload-stop-go@2x.png
-  skin/classic/browser/reload-stop-go-preWin10.png
-  skin/classic/browser/reload-stop-go-preWin10@2x.png
+  skin/classic/browser/reload-stop-go-XPVista7.png
+  skin/classic/browser/reload-stop-go-XPVista7@2x.png
   skin/classic/browser/searchbar.css
   skin/classic/browser/setDesktopBackground.css
   skin/classic/browser/slowStartup-16.png
   skin/classic/browser/Toolbar.png
   skin/classic/browser/Toolbar@2x.png
   skin/classic/browser/Toolbar-aero.png
   skin/classic/browser/Toolbar-aero@2x.png
   skin/classic/browser/Toolbar-inverted.png
@@ -80,18 +80,18 @@ browser.jar:
   skin/classic/browser/Toolbar-win8@2x.png
   skin/classic/browser/Toolbar-XP.png
   skin/classic/browser/toolbarbutton-dropdown-arrow.png
   skin/classic/browser/toolbarbutton-dropdown-arrow-XPVista7.png
   skin/classic/browser/toolbarbutton-dropdown-arrow-inverted.png
   skin/classic/browser/urlbar-popup-blocked.png
   skin/classic/browser/urlbar-history-dropmarker.png
   skin/classic/browser/urlbar-history-dropmarker@2x.png
-  skin/classic/browser/urlbar-history-dropmarker-preWin10.png
-  skin/classic/browser/urlbar-history-dropmarker-preWin10@2x.png
+  skin/classic/browser/urlbar-history-dropmarker-XPVista7.png
+  skin/classic/browser/urlbar-history-dropmarker-XPVista7@2x.png
   skin/classic/browser/webRTC-indicator.css
   skin/classic/browser/loop/menuPanel.png                      (loop/menuPanel.png)
   skin/classic/browser/loop/menuPanel@2x.png                   (loop/menuPanel@2x.png)
   skin/classic/browser/loop/menuPanel-aero.png                 (loop/menuPanel-aero.png)
   skin/classic/browser/loop/menuPanel-aero@2x.png              (loop/menuPanel-aero@2x.png)
   skin/classic/browser/loop/toolbar.png                        (loop/toolbar.png)
   skin/classic/browser/loop/toolbar@2x.png                     (loop/toolbar@2x.png)
   skin/classic/browser/loop/toolbar-aero.png                   (loop/toolbar-aero.png)
@@ -318,23 +318,27 @@ browser.jar:
 % override chrome://browser/skin/places/unsortedBookmarks.png         chrome://browser/skin/places/unsortedBookmarks-XP.png             os=WINNT osversion<6
 % override chrome://browser/skin/preferences/alwaysAsk.png            chrome://browser/skin/preferences/alwaysAsk-XP.png                os=WINNT osversion<6
 % override chrome://browser/skin/preferences/application.png          chrome://browser/skin/preferences/application-XP.png              os=WINNT osversion<6
 % override chrome://browser/skin/preferences/mail.png                 chrome://browser/skin/preferences/mail-XP.png                     os=WINNT osversion<6
 % override chrome://browser/skin/preferences/Options.png              chrome://browser/skin/preferences/Options-XP.png                  os=WINNT osversion<6
 % override chrome://browser/skin/preferences/saveFile.png             chrome://browser/skin/preferences/saveFile-XP.png                 os=WINNT osversion<6
 
 % override chrome://browser/skin/actionicon-tab.png                   chrome://browser/skin/actionicon-tab-XPVista7.png                 os=WINNT osversion<=6.1
+% override chrome://browser/skin/reload-stop-go.png                   chrome://browser/skin/reload-stop-go-XPVista7.png                 os=WINNT osversion<=6.1
+% override chrome://browser/skin/reload-stop-go@2x.png                chrome://browser/skin/reload-stop-go-XPVista7@2x.png              os=WINNT osversion<=6.1
 % override chrome://browser/skin/sync-horizontalbar.png               chrome://browser/skin/sync-horizontalbar-XPVista7.png             os=WINNT osversion<=6.1
 % override chrome://browser/skin/sync-horizontalbar@2x.png            chrome://browser/skin/sync-horizontalbar-XPVista7@2x.png          os=WINNT osversion<=6.1
 % override chrome://browser/skin/syncProgress-horizontalbar.png       chrome://browser/skin/syncProgress-horizontalbar-XPVista7.png     os=WINNT osversion<=6.1
 % override chrome://browser/skin/syncProgress-horizontalbar@2x.png    chrome://browser/skin/syncProgress-horizontalbar-XPVista7@2x.png  os=WINNT osversion<=6.1
 % override chrome://browser/skin/syncProgress-toolbar.png             chrome://browser/skin/syncProgress-toolbar-XPVista7.png           os=WINNT osversion<=6.1
 % override chrome://browser/skin/syncProgress-toolbar@2x.png          chrome://browser/skin/syncProgress-toolbar-XPVista7@2x.png        os=WINNT osversion<=6.1
 % override chrome://browser/skin/toolbarbutton-dropdown-arrow.png     chrome://browser/skin/toolbarbutton-dropdown-arrow-XPVista7.png   os=WINNT osversion<=6.1
+% override chrome://browser/skin/urlbar-history-dropmarker.png        chrome://browser/skin/urlbar-history-dropmarker-XPVista7.png      os=WINNT osversion<=6.1
+% override chrome://browser/skin/urlbar-history-dropmarker@2x.png     chrome://browser/skin/urlbar-history-dropmarker-XPVista7@2x.png   os=WINNT osversion<=6.1
 % override chrome://browser/skin/places/autocomplete-star.png         chrome://browser/skin/places/autocomplete-star-XPVista7.png       os=WINNT osversion<=6.1
 % override chrome://browser/skin/tabbrowser/newtab.png                chrome://browser/skin/tabbrowser/newtab-XPVista7.png              os=WINNT osversion<=6.1
 % override chrome://browser/skin/tabbrowser/newtab@2x.png             chrome://browser/skin/tabbrowser/newtab-XPVista7@2x.png           os=WINNT osversion<=6.1
 % override chrome://browser/skin/tabbrowser/newtab-inverted.png       chrome://browser/skin/tabbrowser/newtab-inverted-XPVista7.png     os=WINNT osversion<=6.1
 % override chrome://browser/skin/tabbrowser/newtab-inverted@2x.png    chrome://browser/skin/tabbrowser/newtab-inverted-XPVista7@2x.png  os=WINNT osversion<=6.1
 % override chrome://browser/skin/tabbrowser/tab-arrow-left.png        chrome://browser/skin/tabbrowser/tab-arrow-left-XPVista7.png      os=WINNT osversion<=6.1
 % override chrome://browser/skin/tabbrowser/tab-arrow-left@2x.png     chrome://browser/skin/tabbrowser/tab-arrow-left-XPVista7@2x.png   os=WINNT osversion<=6.1
 
@@ -379,19 +383,14 @@ browser.jar:
 % override chrome://browser/skin/loop/toolbar@2x.png                  chrome://browser/skin/loop/toolbar-aero@2x.png                    os=WINNT osversion=6
 % override chrome://browser/skin/loop/toolbar@2x.png                  chrome://browser/skin/loop/toolbar-aero@2x.png                    os=WINNT osversion=6.1
 % override chrome://browser/skin/loop/toolbar@2x.png                  chrome://browser/skin/loop/toolbar-win8@2x.png                    os=WINNT osversion=6.2
 % override chrome://browser/skin/loop/toolbar@2x.png                  chrome://browser/skin/loop/toolbar-win8@2x.png                    os=WINNT osversion=6.3
 % override chrome://browser/skin/preferences/checkbox.png             chrome://browser/skin/preferences/checkbox-aero.png               os=WINNT osversion=6
 % override chrome://browser/skin/preferences/checkbox.png             chrome://browser/skin/preferences/checkbox-aero.png               os=WINNT osversion=6.1
 % override chrome://browser/skin/preferences/checkbox.png             chrome://browser/skin/preferences/checkbox-xp.png                 os=WINNT osversion<6
 
-% override chrome://browser/skin/reload-stop-go.png                   chrome://browser/skin/reload-stop-go-preWin10.png                 os=WINNT osversion<=6.3
-% override chrome://browser/skin/reload-stop-go@2x.png                chrome://browser/skin/reload-stop-go-preWin10@2x.png              os=WINNT osversion<=6.3
-% override chrome://browser/skin/urlbar-history-dropmarker.png        chrome://browser/skin/urlbar-history-dropmarker-preWin10.png      os=WINNT osversion<=6.3
-% override chrome://browser/skin/urlbar-history-dropmarker@2x.png     chrome://browser/skin/urlbar-history-dropmarker-preWin10@2x.png   os=WINNT osversion<=6.3
-
 % override chrome://browser/skin/tabbrowser/tab-background-start.png     chrome://browser/skin/tabbrowser/tab-background-start-preWin10.png     os=WINNT osversion<=6.3
 % override chrome://browser/skin/tabbrowser/tab-background-start@2x.png  chrome://browser/skin/tabbrowser/tab-background-start-preWin10@2x.png  os=WINNT osversion<=6.3
 % override chrome://browser/skin/tabbrowser/tab-background-middle.png    chrome://browser/skin/tabbrowser/tab-background-middle-preWin10.png    os=WINNT osversion<=6.3
 % override chrome://browser/skin/tabbrowser/tab-background-middle@2x.png chrome://browser/skin/tabbrowser/tab-background-middle-preWin10@2x.png os=WINNT osversion<=6.3
 % override chrome://browser/skin/tabbrowser/tab-background-end.png       chrome://browser/skin/tabbrowser/tab-background-end-preWin10.png       os=WINNT osversion<=6.3
 % override chrome://browser/skin/tabbrowser/tab-background-end@2x.png    chrome://browser/skin/tabbrowser/tab-background-end-preWin10@2x.png    os=WINNT osversion<=6.3
rename from browser/themes/windows/reload-stop-go-preWin10.png
rename to browser/themes/windows/reload-stop-go-XPVista7.png
rename from browser/themes/windows/reload-stop-go-preWin10@2x.png
rename to browser/themes/windows/reload-stop-go-XPVista7@2x.png
rename from browser/themes/windows/urlbar-history-dropmarker-preWin10.png
rename to browser/themes/windows/urlbar-history-dropmarker-XPVista7.png
rename from browser/themes/windows/urlbar-history-dropmarker-preWin10@2x.png
rename to browser/themes/windows/urlbar-history-dropmarker-XPVista7@2x.png
--- a/configure.in
+++ b/configure.in
@@ -8772,16 +8772,28 @@ AC_SUBST(MOZ_SIMPLE_PACKAGE_NAME)
 
 AC_SUBST(MOZILLA_OFFICIAL)
 if test "$MOZILLA_OFFICIAL"; then
     AC_DEFINE(MOZILLA_OFFICIAL)
     # Build revisions should always be present in official builds
     MOZ_INCLUDE_SOURCE_INFO=1
 fi
 
+# On official builds, we need to know in Telemetry what revision this is built from.
+# This is e.g. needed to match incoming data to a specific revision of the Histograms.json
+# file.
+if test "$MOZILLA_OFFICIAL" && test -d ${_topsrcdir}/.hg; then
+  SOURCE_REV=`cd $_topsrcdir && hg parent --template='{node|short}'`
+  SOURCE_REPO=`cd $_topsrcdir && hg showconfig paths.default | sed -e 's|^ssh://|http://|' -e 's|/$||'`
+  SOURCE_REV_URL=$SOURCE_REPO/rev/$SOURCE_REV
+else
+  SOURCE_REV_URL=
+fi
+AC_SUBST(SOURCE_REV_URL)
+
 AC_SUBST(MOZ_INCLUDE_SOURCE_INFO)
 
 AC_DEFINE_UNQUOTED(MOZ_TELEMETRY_DISPLAY_REV, 2)
 AC_SUBST(MOZ_TELEMETRY_DISPLAY_REV)
 
 if test "$MOZ_TELEMETRY_REPORTING"; then
     AC_DEFINE(MOZ_TELEMETRY_REPORTING)
 
--- a/devtools/client/jsonview/converter-child.js
+++ b/devtools/client/jsonview/converter-child.js
@@ -191,28 +191,28 @@ var Converter = Class({
 
   htmlEncode: function(t) {
     return t !== null ? t.toString().replace(/&/g,"&amp;").
       replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;") : '';
   },
 
   toHTML: function(json, headers, title) {
     var themeClassName = "theme-" + JsonViewUtils.getCurrentTheme();
-    var baseUrl = "resource:///modules/devtools/client/jsonview/";
-    var theme = (themeClassName == "theme-light") ? "light" : "dark";
-    var themeUrl = '<link rel="stylesheet" type="text/css" ' +
-      'href="css/' + theme + '-theme.css">';
+    var clientBaseUrl = "resource:///modules/devtools/client/";
+    var baseUrl = clientBaseUrl + "jsonview/";
+    var themeVarsUrl = clientBaseUrl + "themes/variables.css";
 
     return '<!DOCTYPE html>\n' +
-      '<html><head><title>' + this.htmlEncode(title) + '</title>' +
+      '<html class="' + themeClassName + '">' +
+      '<head><title>' + this.htmlEncode(title) + '</title>' +
       '<base href="' + this.htmlEncode(baseUrl) + '">' +
+      '<link rel="stylesheet" type="text/css" href="' + themeVarsUrl + '">' +
       '<link rel="stylesheet" type="text/css" href="css/main.css">' +
-      themeUrl +
       '<script data-main="viewer-config" src="lib/require.js"></script>' +
-      '</head><body class="' + themeClassName + '">' +
+      '</head><body>' +
       '<div id="content"></div>' +
       '<div id="json">' + this.htmlEncode(json) + '</div>' +
       '<div id="headers">' + this.htmlEncode(headers) + '</div>' +
       '</body></html>';
   },
 
   toErrorPage: function(error, data, uri) {
     // Escape unicode nulls
deleted file mode 100644
--- a/devtools/client/jsonview/css/dark-theme.css
+++ /dev/null
@@ -1,27 +0,0 @@
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/******************************************************************************/
-/* Dark Theme (copied from themes/dark-theme.css) */
-
-:root {
-  --theme-body-background: #14171a;
-
-  --theme-tab-toolbar-background: #252c33;
-  --theme-toolbar-background: #343c45;
-  --theme-selection-background: #1d4f73;
-  --theme-splitter-color: black;
-  --theme-selection-color: #f5f7fa;
-  --theme-comment: #757873;
-
-  --theme-body-color: #8fa1b2;
-  --theme-body-color-alt: #b6babf;
-  --theme-content-color1: #a9bacb;
-
-  --theme-highlight-green: #70bf53;
-  --theme-highlight-blue: #46afe3;
-  --theme-highlight-orange: #d96629;
-  --theme-highlight-bluegrey: #5e88b0;
-}
deleted file mode 100644
--- a/devtools/client/jsonview/css/light-theme.css
+++ /dev/null
@@ -1,27 +0,0 @@
-/* vim:set ts=2 sw=2 sts=2 et: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/******************************************************************************/
-/* Light Theme Constants (copied from themes/light-theme.css) */
-
-:root {
-  --theme-body-background: #fcfcfc;
-
-  --theme-tab-toolbar-background: #ebeced;
-  --theme-toolbar-background: #f0f1f2;
-  --theme-selection-background: #4c9ed9;
-  --theme-splitter-color: #aaaaaa;
-  --theme-selection-color: #f5f7fa;
-  --theme-comment: #757873;
-
-  --theme-body-color: #18191a;
-  --theme-body-color-alt: #585959;
-  --theme-content-color1: #292e33;
-
-  --theme-highlight-green: #2cbb0f;
-  --theme-highlight-blue: #0088cc;
-  --theme-highlight-orange: #f13c00;
-  --theme-highlight-bluegrey: #0072ab;
-}
--- a/devtools/client/jsonview/css/moz.build
+++ b/devtools/client/jsonview/css/moz.build
@@ -1,22 +1,20 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 
 DevToolsModules(
-    'dark-theme.css',
     'dom-tree.css',
     'general.css',
     'headers-panel.css',
     'json-panel.css',
-    'light-theme.css',
     'main.css',
     'read-only-prop.svg',
     'reps.css',
     'search-box.css',
     'search.svg',
     'tabs.css',
     'text-panel.css',
     'toolbar.css',
--- a/devtools/client/moz.build
+++ b/devtools/client/moz.build
@@ -30,16 +30,17 @@ DIRS += [
     'scratchpad',
     'shadereditor',
     'shared',
     'shims',
     'sourceeditor',
     'storage',
     'styleeditor',
     'styleinspector',
+    'themes',
     'tilt',
     'webaudioeditor',
     'webconsole',
     'webide',
 ]
 
 # Shim old theme paths used by DevTools add-ons
 if CONFIG['MOZ_BUILD_APP'] == 'browser':
--- a/devtools/client/performance/views/details-waterfall.js
+++ b/devtools/client/performance/views/details-waterfall.js
@@ -125,17 +125,17 @@ var WaterfallView = Heritage.extend(Deta
     // marker model
     this._cache = new WeakMap();
   },
 
   /**
    * Called when MarkerDetails view emits an event to view source.
    */
   _onViewSource: function (_, data) {
-    gToolbox.viewSourceInDebugger(data.file, data.line);
+    gToolbox.viewSourceInDebugger(data.url, data.line);
   },
 
   /**
    * Called when MarkerDetails view emits an event to snap to allocations.
    */
   _onShowAllocations: function (_, data) {
     let { endTime } = data;
     let startTime = 0;
--- a/devtools/client/themes/computedview.css
+++ b/devtools/client/themes/computedview.css
@@ -15,16 +15,22 @@
 
 body {
   margin: 0;
   display : flex;
   flex-direction: column;
   height: 100%;
 }
 
+#browser-style-checkbox {
+  /* Bug 1200073 - extra space before the browser styles checkbox so
+     they aren't squished together in a small window. */
+  -moz-margin-start: 5px;
+}
+
 #propertyContainer {
   -moz-user-select: text;
   overflow: auto;
   min-height: 0;
   flex: 1;
 }
 
 .row-striped {
new file mode 100644
--- /dev/null
+++ b/devtools/client/themes/moz.build
@@ -0,0 +1,9 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DevToolsModules(
+    'variables.css',
+)
--- a/devtools/shared/DevToolsUtils.js
+++ b/devtools/shared/DevToolsUtils.js
@@ -436,17 +436,28 @@ exports.defineLazyGetter = function defi
       return aObject[aName] = aLambda.apply(aObject);
     },
     configurable: true,
     enumerable: true
   });
 };
 
 // DEPRECATED: use DevToolsUtils.assert(condition, message) instead!
+let haveLoggedDeprecationMessage = false;
 exports.dbg_assert = function dbg_assert(cond, e) {
+  if (!haveLoggedDeprecationMessage) {
+    haveLoggedDeprecationMessage = true;
+    const deprecationMessage = "DevToolsUtils.dbg_assert is deprecated! Use DevToolsUtils.assert instead!\n"
+          + Error().stack;
+    dump(deprecationMessage);
+    if (typeof console === "object" && console && console.warn) {
+      console.warn(deprecationMessage);
+    }
+  }
+
   if (!cond) {
     return e;
   }
 };
 
 /**
  * DevToolsUtils.assert(condition, message)
  *
--- a/devtools/shared/gcli/commands/security.js
+++ b/devtools/shared/gcli/commands/security.js
@@ -36,17 +36,17 @@ const WILDCARD_MSG = l10n.lookup("securi
 const XSS_WARNING_MSG = l10n.lookup("securityCSPPotentialXSS");
 const NO_CSP_ON_PAGE_MSG = l10n.lookup("securityCSPNoCSPOnPage");
 const CONTENT_SECURITY_POLICY_MSG = l10n.lookup("securityCSPHeaderOnPage");
 const CONTENT_SECURITY_POLICY_REPORT_ONLY_MSG = l10n.lookup("securityCSPROHeaderOnPage");
 
 const NEXT_URI_HEADER = l10n.lookup("securityReferrerNextURI");
 const CALCULATED_REFERRER_HEADER = l10n.lookup("securityReferrerCalculatedReferrer");
 /* The official names from the W3C Referrer Policy Draft http://www.w3.org/TR/referrer-policy/ */
-const REFERRER_POLICY_NAMES = [ "None When Downgrade", "None", "Origin Only", "Origin When Cross-Origin", "Unsafe URL" ];
+const REFERRER_POLICY_NAMES = [ "None When Downgrade (default)", "None", "Origin Only", "Origin When Cross-Origin", "Unsafe URL" ];
 
 exports.items = [
   {
     // --- General Security information
     name: "security",
     description: l10n.lookup("securityPrivacyDesc"),
     manual: l10n.lookup("securityManual")
   },
@@ -196,83 +196,127 @@ exports.items = [
       var doc = context.environment.document;
 
       var referrerPolicy = doc.referrerPolicy;
 
       var pageURI = doc.documentURIObject;
       var sameDomainReferrer = "";
       var otherDomainReferrer = "";
       var downgradeReferrer = "";
+      var otherDowngradeReferrer = "";
       var origin = pageURI.prePath;
 
       switch (referrerPolicy) {
         case Ci.nsIHttpChannel.REFERRER_POLICY_NO_REFERRER:
           // sends no referrer
-          sameDomainReferrer = otherDomainReferrer = downgradeReferrer = "(no referrer)";
+          sameDomainReferrer
+            = otherDomainReferrer
+            = downgradeReferrer
+            = otherDowngradeReferrer
+            = "(no referrer)";
           break;
         case Ci.nsIHttpChannel.REFERRER_POLICY_ORIGIN:
           // only sends the origin of the referring URL
-          sameDomainReferrer = otherDomainReferrer = downgradeReferrer = origin;
+          sameDomainReferrer
+            = otherDomainReferrer
+            = downgradeReferrer
+            = otherDowngradeReferrer
+            = origin;
           break;
         case Ci.nsIHttpChannel.REFERRER_POLICY_ORIGIN_WHEN_XORIGIN:
           // same as default, but reduced to ORIGIN when cross-origin.
           sameDomainReferrer = pageURI.spec;
-          otherDomainReferrer = origin;
-          downgradeReferrer = "(no referrer)";
+          otherDomainReferrer
+            = downgradeReferrer
+            = otherDowngradeReferrer
+            = origin;
           break;
         case Ci.nsIHttpChannel.REFERRER_POLICY_UNSAFE_URL:
           // always sends the referrer, even on downgrade.
-          sameDomainReferrer = otherDomainReferrer = downgradeReferrer = pageURI.spec;
+          sameDomainReferrer
+            = otherDomainReferrer
+            = downgradeReferrer
+            = otherDowngradeReferrer
+            = pageURI.spec;
           break;
         case Ci.nsIHttpChannel.REFERRER_POLICY_NO_REFERRER_WHEN_DOWNGRADE:
           // default state, doesn't send referrer from https->http
           sameDomainReferrer = otherDomainReferrer = pageURI.spec;
-          downgradeReferrer = "(no referrer)";
+          downgradeReferrer = otherDowngradeReferrer = "(no referrer)";
           break;
         default:
           // this is a new referrer policy which we do not know about
-          sameDomainReferrer = otherDomainReferrer = downgradeReferrer = "(unknown Referrer Policy)";
+          sameDomainReferrer
+            = otherDomainReferrer
+            = downgradeReferrer
+            = otherDowngradeReferrer
+            = "(unknown Referrer Policy)";
           break;
       }
 
       var sameDomainUri = origin + "/*";
 
       var referrerUrls = [
         // add the referrer uri 'referrer' we would send when visiting 'uri'
-        {uri: 'http://example.com/', referrer: otherDomainReferrer},
-        {uri: sameDomainUri, referrer: sameDomainReferrer}
+        {
+          uri: pageURI.scheme+'://example.com/',
+          referrer: otherDomainReferrer,
+          description: l10n.lookup('securityReferrerPolicyOtherDomain')},
+        {
+          uri: sameDomainUri,
+          referrer: sameDomainReferrer,
+          description: l10n.lookup('securityReferrerPolicySameDomain')}
       ];
 
       if (pageURI.schemeIs('https')) {
         // add the referrer we would send on downgrading http->https
-        referrerUrls.push({uri: "http://"+pageURI.hostPort+"/*", referrer: downgradeReferrer});
+        if (sameDomainReferrer != downgradeReferrer) {
+          referrerUrls.push({
+            uri: "http://"+pageURI.hostPort+"/*",
+            referrer: downgradeReferrer,
+            description:
+              l10n.lookup('securityReferrerPolicySameDomainDowngrade')
+          });
+        }
+        if (otherDomainReferrer != otherDowngradeReferrer) {
+          referrerUrls.push({
+            uri: "http://example.com/",
+            referrer: otherDowngradeReferrer,
+            description:
+              l10n.lookup('securityReferrerPolicyOtherDomainDowngrade')
+          });
+        }
       }
 
       return {
-        header: l10n.lookupFormat("securityReferrerPolicyReportHeader", [pageURI.spec]),
+        header: l10n.lookupFormat("securityReferrerPolicyReportHeader",
+                                  [pageURI.spec]),
         policyName: REFERRER_POLICY_NAMES[referrerPolicy],
         urls: referrerUrls
       }
     }
   },
   {
     item: "converter",
     from: "securityReferrerPolicyInfo",
     to: "view",
     exec: function(referrerPolicyInfo, context) {
       return context.createView({
           html:
           "<div class='gcli-referrer-policy'>" +
           "  <strong> ${rpi.header} </strong> <br />" +
           "  ${rpi.policyName} <br />" +
           "  <table class='gcli-referrer-policy-detail' cellspacing='10' >" +
-          "    <tr><th> " + NEXT_URI_HEADER + " </th><th> " + CALCULATED_REFERRER_HEADER + " </th></tr>" +
+          "    <tr>" +
+          "      <th> " + NEXT_URI_HEADER + " </th>" +
+          "      <th> " + CALCULATED_REFERRER_HEADER + " </th>" +
+          "    </tr>" +
           // iterate all policies
           "    <tr foreach='nextURI in ${rpi.urls}' >" +
-          "      <td> ${nextURI.uri} </td>" +
+          "      <td> ${nextURI.description} (e.g., ${nextURI.uri}) </td>" +
           "      <td> ${nextURI.referrer} </td>" +
           "    </tr>" +
           "  </table>" +
           "</div>",
           data: {
             rpi: referrerPolicyInfo,
           }
         });
--- a/dom/events/KeyNameList.h
+++ b/dom/events/KeyNameList.h
@@ -26,16 +26,19 @@
 DEFINE_KEYNAME_WITH_SAME_NAME(Unidentified)
 
 /******************************************************************************
  * Our Internal Key Values (must have "Moz" prefix)
  *****************************************************************************/
 DEFINE_KEYNAME_INTERNAL(PrintableKey, "MozPrintableKey")
 DEFINE_KEYNAME_INTERNAL(HomeScreen, "MozHomeScreen")
 DEFINE_KEYNAME_INTERNAL(CameraFocusAdjust, "MozCameraFocusAdjust")
+DEFINE_KEYNAME_INTERNAL(PhoneCall, "MozPhoneCall")
+DEFINE_KEYNAME_INTERNAL(SoftLeft, "MozSoftLeft")
+DEFINE_KEYNAME_INTERNAL(SoftRight, "MozSoftRight")
 
 /******************************************************************************
  * Modifier Keys
  *****************************************************************************/
 DEFINE_KEYNAME_WITH_SAME_NAME(Alt)
 DEFINE_KEYNAME_WITH_SAME_NAME(AltGraph)
 DEFINE_KEYNAME_WITH_SAME_NAME(CapsLock)
 DEFINE_KEYNAME_WITH_SAME_NAME(Control)
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -505,26 +505,18 @@ private:
         mozilla::dom::ContentChild* content =
             mozilla::dom::ContentChild::GetSingleton();
         if (aBlock) {
             content->GetIPCChannel()->Block();
         } else {
             content->GetIPCChannel()->Unblock();
         }
 
-        nsTArray<IToplevelProtocol*> actors;
-        content->GetOpenedActors(actors);
-        for (size_t j = 0; j < actors.Length(); j++) {
-            IToplevelProtocol* actor = actors[j];
-            if (aBlock) {
-                actor->GetIPCChannel()->Block();
-            } else {
-                actor->GetIPCChannel()->Unblock();
-            }
-        }
+        // Other IPC channels do not perform the checks through Block() and
+        // Unblock().
     }
 };
 #endif
 
 static bool sPreloaded = false;
 
 /*static*/ void
 TabChild::PreloadSlowThings()
--- a/dom/ipc/tests/mochitest.ini
+++ b/dom/ipc/tests/mochitest.ini
@@ -11,17 +11,17 @@ skip-if = buildapp == 'b2g' || buildapp 
 [test_bug1086684.html]
 # This test is only supposed to run in the main process
 skip-if = buildapp == 'b2g' || buildapp == 'mulet' || e10s || toolkit == 'android'
 [test_cpow_cookies.html]
 skip-if = buildapp == 'b2g' || buildapp == 'mulet'
 [test_NuwaProcessCreation.html]
 skip-if = toolkit != 'gonk'
 [test_NuwaProcessDeadlock.html]
-skip-if = true # bug 1166923
+skip-if = toolkit != 'gonk'
 [test_child_docshell.html]
 skip-if = toolkit == 'cocoa' # disabled due to hangs, see changeset 6852e7c47edf
 [test_CrashService_crash.html]
 skip-if = !(crashreporter && !e10s && (toolkit == 'gtk2' || toolkit == 'gtk3' || toolkit == 'cocoa' || toolkit == 'windows') && (buildapp != 'b2g' || toolkit == 'gonk') && (buildapp != 'mulet')) # TC: Bug 1144079 - Re-enable Mulet mochitests and reftests taskcluster-specific disables.
 [test_permission_for_in_process_app.html]
 skip-if = e10s || os == "android" || toolkit == "gonk" # embed-apps doesn't work in mochitest app
 support-files =
   test_permission_helper.js
--- a/dom/ipc/tests/test_NuwaProcessDeadlock.html
+++ b/dom/ipc/tests/test_NuwaProcessDeadlock.html
@@ -9,30 +9,32 @@ Test if Nuwa process created successfull
 </head>
 <body onload="setup()">
 
 <script type="application/javascript;version=1.7">
 "use strict";
 
 function runTest()
 {
+  info("Shut down processes by disabling process prelaunch");
+  SpecialPowers.setBoolPref('dom.ipc.processPrelaunch.enabled', false);
+
   info("Launch the Nuwa process");
   let cpmm = SpecialPowers.Cc["@mozilla.org/childprocessmessagemanager;1"]
                           .getService(SpecialPowers.Ci.nsISyncMessageSender);
   let seenNuwaReady = false;
   let msgHandler = {
     receiveMessage: function receiveMessage(msg) {
       msg = SpecialPowers.wrap(msg);
       if (msg.name == 'TEST-ONLY:nuwa-ready') {
-        ok(true, "Got nuwa-ready");
-        is(seenNuwaReady, false, "Already received nuwa ready");
+        is(seenNuwaReady, false, "The Nuwa process is launched");
         seenNuwaReady = true;
       } else if (msg.name == 'TEST-ONLY:nuwa-add-new-process') {
         ok(true, "Got nuwa-add-new-process");
-        is(seenNuwaReady, true, "Receive nuwa-add-new-process before nuwa-ready");
+        is(seenNuwaReady, true, "The preallocated process is launched from the Nuwa process");
         shutdown();
       }
     }
   };
 
   function shutdown() {
     info("Shut down the test case");
     cpmm.removeMessageListener("TEST-ONLY:nuwa-ready", msgHandler);
@@ -46,22 +48,21 @@ function runTest()
 
 
   // Setting this pref to true should cause us to prelaunch a process.
   SpecialPowers.setBoolPref('dom.ipc.processPrelaunch.enabled', true);
 }
 
 function setup()
 {
-  info("Set up preferences for testing deadlock in the Nuwa process.");
+  info("Set up preferences for testing the Nuwa process.");
   SimpleTest.waitForExplicitFinish();
 
   SpecialPowers.pushPrefEnv({
     'set': [
-      ['dom.ipc.processPrelaunch.enabled', false],
       ['dom.ipc.preallocatedProcessManager.testMode', true],
       ['dom.ipc.processPrelaunch.testMode', true]  // For testing deadlock
     ]
   }, runTest);
 }
 
 </script>
 </body>
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -1558,16 +1558,48 @@ MediaManager::Get() {
     // else MediaManager won't work properly and will leak (see bug 837874)
     nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
     if (prefs) {
       prefs->AddObserver("media.navigator.video.default_width", sSingleton, false);
       prefs->AddObserver("media.navigator.video.default_height", sSingleton, false);
       prefs->AddObserver("media.navigator.video.default_fps", sSingleton, false);
       prefs->AddObserver("media.navigator.video.default_minfps", sSingleton, false);
     }
+
+    // Prepare async shutdown
+
+    nsCOMPtr<nsIAsyncShutdownClient> profileBeforeChange;
+    {
+      nsCOMPtr<nsIAsyncShutdownService> svc = services::GetAsyncShutdown();
+      MOZ_RELEASE_ASSERT(svc);
+      nsresult rv = svc->GetProfileBeforeChange(getter_AddRefs(profileBeforeChange));
+      MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
+    }
+
+    class Blocker : public media::ShutdownBlocker
+    {
+    public:
+      Blocker()
+      : media::ShutdownBlocker(NS_LITERAL_STRING(
+          "Media shutdown: blocking on media thread")) {}
+
+      NS_IMETHOD BlockShutdown(nsIAsyncShutdownClient* aProfileBeforeChange) override
+      {
+        MOZ_RELEASE_ASSERT(MediaManager::GetIfExists());
+        MediaManager::GetIfExists()->Shutdown();
+        return NS_OK;
+      }
+    };
+
+    sSingleton->mShutdownBlocker = new Blocker();
+    nsresult rv = profileBeforeChange->AddBlocker(sSingleton->mShutdownBlocker,
+                                                  NS_LITERAL_STRING(__FILE__),
+                                                  __LINE__,
+                                                  NS_LITERAL_STRING("Media shutdown"));
+    MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
 #ifdef MOZ_B2G
     // Init MediaPermissionManager before sending out any permission requests.
     (void) MediaPermissionManager::GetInstance();
 #endif //MOZ_B2G
   }
   return sSingleton;
 }
 
@@ -2528,118 +2560,140 @@ MediaManager::GetPrefs(nsIPrefBranch *aB
 {
   GetPref(aBranch, "media.navigator.video.default_width", aData, &mPrefs.mWidth);
   GetPref(aBranch, "media.navigator.video.default_height", aData, &mPrefs.mHeight);
   GetPref(aBranch, "media.navigator.video.default_fps", aData, &mPrefs.mFPS);
   GetPref(aBranch, "media.navigator.video.default_minfps", aData, &mPrefs.mMinFPS);
   GetPref(aBranch, "media.navigator.audio.fake_frequency", aData, &mPrefs.mFreq);
 }
 
+void
+MediaManager::Shutdown()
+{
+  MOZ_ASSERT(NS_IsMainThread());
+  if (sInShutdown) {
+    return;
+  }
+  sInShutdown = true;
+
+  nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
+
+  obs->RemoveObserver(this, "xpcom-will-shutdown");
+  obs->RemoveObserver(this, "last-pb-context-exited");
+  obs->RemoveObserver(this, "getUserMedia:privileged:allow");
+  obs->RemoveObserver(this, "getUserMedia:response:allow");
+  obs->RemoveObserver(this, "getUserMedia:response:deny");
+  obs->RemoveObserver(this, "getUserMedia:revoke");
+
+  nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
+  if (prefs) {
+    prefs->RemoveObserver("media.navigator.video.default_width", this);
+    prefs->RemoveObserver("media.navigator.video.default_height", this);
+    prefs->RemoveObserver("media.navigator.video.default_fps", this);
+    prefs->RemoveObserver("media.navigator.video.default_minfps", this);
+    prefs->RemoveObserver("media.navigator.audio.fake_frequency", this);
+  }
+
+  // Close off any remaining active windows.
+  GetActiveWindows()->Clear();
+  mActiveCallbacks.Clear();
+  mCallIds.Clear();
+  {
+    MutexAutoLock lock(mMutex);
+    if (mBackend) {
+      mBackend->Shutdown(); // ok to invoke multiple times
+    }
+  }
+
+  // Because mMediaThread is not an nsThread, we must dispatch to it so it can
+  // clean up BackgroundChild. Continue stopping thread once this is done.
+
+  class ShutdownTask : public Task
+  {
+  public:
+    ShutdownTask(already_AddRefed<MediaEngine> aBackend,
+                 nsRunnable* aReply)
+      : mReply(aReply)
+      , mBackend(aBackend) {}
+  private:
+    virtual void
+    Run()
+    {
+      LOG(("MediaManager Thread Shutdown"));
+      MOZ_ASSERT(MediaManager::IsInMediaThread());
+      mozilla::ipc::BackgroundChild::CloseForCurrentThread();
+      // must explicitly do this before dispatching the reply, since the reply may kill us with Stop()
+      mBackend = nullptr; // last reference, will invoke Shutdown() again
+
+      if (NS_FAILED(NS_DispatchToMainThread(mReply.forget()))) {
+        LOG(("Will leak thread: DispatchToMainthread of reply runnable failed in MediaManager shutdown"));
+      }
+    }
+    RefPtr<nsRunnable> mReply;
+    RefPtr<MediaEngine> mBackend;
+  };
+
+  // Post ShutdownTask to execute on mMediaThread and pass in a lambda
+  // callback to be executed back on this thread once it is done.
+  //
+  // The lambda callback "captures" the 'this' pointer for member access.
+  // This is safe since this is guaranteed to be here since sSingleton isn't
+  // cleared until the lambda function clears it.
+
+  // note that this == sSingleton
+  RefPtr<MediaManager> that(sSingleton);
+  // Release the backend (and call Shutdown()) from within the MediaManager thread
+  RefPtr<MediaEngine> temp;
+  {
+    MutexAutoLock lock(mMutex);
+    temp = mBackend.forget();
+  }
+  // Don't use MediaManager::PostTask() because we're sInShutdown=true here!
+  mMediaThread->message_loop()->PostTask(FROM_HERE, new ShutdownTask(
+      temp.forget(),
+      media::NewRunnableFrom([this, that]() mutable {
+    LOG(("MediaManager shutdown lambda running, releasing MediaManager singleton and thread"));
+    if (mMediaThread) {
+      mMediaThread->Stop();
+    }
+
+    // Remove async shutdown blocker
+
+    nsCOMPtr<nsIAsyncShutdownClient> profileBeforeChange;
+    {
+      nsCOMPtr<nsIAsyncShutdownService> svc = services::GetAsyncShutdown();
+      MOZ_RELEASE_ASSERT(svc);
+      nsresult rv = svc->GetProfileBeforeChange(getter_AddRefs(profileBeforeChange));
+      MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
+    }
+    profileBeforeChange->RemoveBlocker(sSingleton->mShutdownBlocker);
+
+    // we hold a ref to 'that' which is the same as sSingleton
+    sSingleton = nullptr;
+
+    return NS_OK;
+  })));
+}
+
 nsresult
 MediaManager::Observe(nsISupports* aSubject, const char* aTopic,
   const char16_t* aData)
 {
   MOZ_ASSERT(NS_IsMainThread());
-  nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
 
   if (!strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID)) {
     nsCOMPtr<nsIPrefBranch> branch( do_QueryInterface(aSubject) );
     if (branch) {
       GetPrefs(branch,NS_ConvertUTF16toUTF8(aData).get());
       LOG(("%s: %dx%d @%dfps (min %d)", __FUNCTION__,
            mPrefs.mWidth, mPrefs.mHeight, mPrefs.mFPS, mPrefs.mMinFPS));
     }
   } else if (!strcmp(aTopic, "xpcom-will-shutdown")) {
-    sInShutdown = true;
-
-    obs->RemoveObserver(this, "xpcom-will-shutdown");
-    obs->RemoveObserver(this, "last-pb-context-exited");
-    obs->RemoveObserver(this, "getUserMedia:privileged:allow");
-    obs->RemoveObserver(this, "getUserMedia:response:allow");
-    obs->RemoveObserver(this, "getUserMedia:response:deny");
-    obs->RemoveObserver(this, "getUserMedia:revoke");
-
-    nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
-    if (prefs) {
-      prefs->RemoveObserver("media.navigator.video.default_width", this);
-      prefs->RemoveObserver("media.navigator.video.default_height", this);
-      prefs->RemoveObserver("media.navigator.video.default_fps", this);
-      prefs->RemoveObserver("media.navigator.video.default_minfps", this);
-      prefs->RemoveObserver("media.navigator.audio.fake_frequency", this);
-    }
-
-    // Close off any remaining active windows.
-    GetActiveWindows()->Clear();
-    mActiveCallbacks.Clear();
-    mCallIds.Clear();
-    {
-      MutexAutoLock lock(mMutex);
-      if (mBackend) {
-        mBackend->Shutdown(); // ok to invoke multiple times
-      }
-    }
-
-    // Because mMediaThread is not an nsThread, we must dispatch to it so it can
-    // clean up BackgroundChild. Continue stopping thread once this is done.
-
-    class ShutdownTask : public Task
-    {
-    public:
-      ShutdownTask(already_AddRefed<MediaEngine> aBackend,
-                   nsRunnable* aReply)
-        : mReply(aReply)
-        , mBackend(aBackend) {}
-    private:
-      virtual void
-      Run()
-      {
-        LOG(("MediaManager Thread Shutdown"));
-        MOZ_ASSERT(MediaManager::IsInMediaThread());
-        mozilla::ipc::BackgroundChild::CloseForCurrentThread();
-        // must explicitly do this before dispatching the reply, since the reply may kill us with Stop()
-        mBackend = nullptr; // last reference, will invoke Shutdown() again
-
-        if (NS_FAILED(NS_DispatchToMainThread(mReply.forget()))) {
-          LOG(("Will leak thread: DispatchToMainthread of reply runnable failed in MediaManager shutdown"));
-        }
-      }
-      RefPtr<nsRunnable> mReply;
-      RefPtr<MediaEngine> mBackend;
-    };
-
-    // Post ShutdownTask to execute on mMediaThread and pass in a lambda
-    // callback to be executed back on this thread once it is done.
-    //
-    // The lambda callback "captures" the 'this' pointer for member access.
-    // This is safe since this is guaranteed to be here since sSingleton isn't
-    // cleared until the lambda function clears it.
-
-    // note that this == sSingleton
-    RefPtr<MediaManager> that(sSingleton);
-    // Release the backend (and call Shutdown()) from within the MediaManager thread
-    RefPtr<MediaEngine> temp;
-    {
-      MutexAutoLock lock(mMutex);
-      temp = mBackend.forget();
-    }
-    // Don't use MediaManager::PostTask() because we're sInShutdown=true here!
-    mMediaThread->message_loop()->PostTask(FROM_HERE, new ShutdownTask(
-        temp.forget(),
-        media::NewRunnableFrom([this, that]() mutable {
-      LOG(("MediaManager shutdown lambda running, releasing MediaManager singleton and thread"));
-      if (mMediaThread) {
-        mMediaThread->Stop();
-      }
-      // we hold a ref to 'that' which is the same as sSingleton
-      sSingleton = nullptr;
-
-      return NS_OK;
-    })));
+    Shutdown();
     return NS_OK;
-
   } else if (!strcmp(aTopic, "last-pb-context-exited")) {
     // Clear memory of private-browsing-specific deviceIds. Fire and forget.
     media::SanitizeOriginKeys(0, true);
     return NS_OK;
   } else if (!strcmp(aTopic, "getUserMedia:privileged:allow") ||
              !strcmp(aTopic, "getUserMedia:response:allow")) {
     nsString key(aData);
     nsAutoPtr<GetUserMediaTask> task;
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -510,31 +510,33 @@ private:
   void GetPrefBool(nsIPrefBranch *aBranch, const char *aPref,
                    const char *aData, bool *aVal);
   void GetPrefs(nsIPrefBranch *aBranch, const char *aData);
 
   // Make private because we want only one instance of this class
   MediaManager();
 
   ~MediaManager() {}
+  void Shutdown();
 
   void StopScreensharing(uint64_t aWindowID);
   void IterateWindowListeners(nsPIDOMWindow *aWindow,
                               WindowListenerCallback aCallback,
                               void *aData);
 
   void StopMediaStreams();
 
   // ONLY access from MainThread so we don't need to lock
   WindowTable mActiveWindows;
   nsClassHashtable<nsStringHashKey, GetUserMediaTask> mActiveCallbacks;
   nsClassHashtable<nsUint64HashKey, nsTArray<nsString>> mCallIds;
 
   // Always exists
   nsAutoPtr<base::Thread> mMediaThread;
+  nsCOMPtr<nsIAsyncShutdownBlocker> mShutdownBlocker;
 
   Mutex mMutex;
   // protected with mMutex:
   RefPtr<MediaEngine> mBackend;
 
   static StaticRefPtr<MediaManager> sSingleton;
 
   media::CoatCheck<PledgeSourceSet> mOutstandingPledges;
--- a/dom/media/systemservices/MediaUtils.cpp
+++ b/dom/media/systemservices/MediaUtils.cpp
@@ -4,10 +4,12 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "MediaUtils.h"
 
 namespace mozilla {
 namespace media {
 
+NS_IMPL_ISUPPORTS(ShutdownBlocker, nsIAsyncShutdownBlocker)
+
 } // namespace media
 } // namespace mozilla
--- a/dom/media/systemservices/MediaUtils.h
+++ b/dom/media/systemservices/MediaUtils.h
@@ -4,16 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_MediaUtils_h
 #define mozilla_MediaUtils_h
 
 #include "nsAutoPtr.h"
 #include "nsThreadUtils.h"
+#include "nsIAsyncShutdown.h"
 
 namespace mozilla {
 namespace media {
 
 /*
  * media::Pledge - A promise-like pattern for c++ that takes lambda functions.
  *
  * Asynchronous APIs that proxy to another thread or to the chrome process and
@@ -352,12 +353,41 @@ class Refcountable<ScopedDeletePtr<T>> :
 {
 public:
   explicit Refcountable<ScopedDeletePtr<T>>(T* aPtr) : ScopedDeletePtr<T>(aPtr) {}
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Refcountable<T>)
 private:
   ~Refcountable<ScopedDeletePtr<T>>() {}
 };
 
+/* media::ShutdownBlocker - Async shutdown helper.
+ */
+
+class ShutdownBlocker : public nsIAsyncShutdownBlocker
+{
+public:
+  ShutdownBlocker(const nsString& aName) : mName(aName) {}
+
+  NS_IMETHOD
+  BlockShutdown(nsIAsyncShutdownClient* aProfileBeforeChange) override = 0;
+
+  NS_IMETHOD GetName(nsAString& aName) override
+  {
+    aName = mName;
+    return NS_OK;
+  }
+
+  NS_IMETHOD GetState(nsIPropertyBag**) override
+  {
+    return NS_OK;
+  }
+
+  NS_DECL_ISUPPORTS
+protected:
+  virtual ~ShutdownBlocker() {}
+private:
+  const nsString mName;
+};
+
 } // namespace media
 } // namespace mozilla
 
 #endif // mozilla_MediaUtils_h
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -1879,37 +1879,16 @@ CompositorParent::Create(Transport* aTra
     FROM_HERE,
     NewRunnableFunction(OpenCompositor, cpcp.get(),
                         aTransport, aOtherPid, XRE_GetIOMessageLoop()));
   // The return value is just compared to null for success checking,
   // we're not sharing a ref.
   return cpcp.get();
 }
 
-IToplevelProtocol*
-CompositorParent::CloneToplevel(const InfallibleTArray<mozilla::ipc::ProtocolFdMapping>& aFds,
-                                base::ProcessHandle aPeerProcess,
-                                mozilla::ipc::ProtocolCloneContext* aCtx)
-{
-  for (unsigned int i = 0; i < aFds.Length(); i++) {
-    if (aFds[i].protocolId() == (unsigned)GetProtocolId()) {
-      Transport* transport = OpenDescriptor(aFds[i].fd(),
-                                            Transport::MODE_SERVER);
-      PCompositorParent* compositor = Create(transport, base::GetProcId(aPeerProcess));
-      compositor->CloneManagees(this, aCtx);
-      compositor->IToplevelProtocol::SetTransport(transport);
-      // The reference to the compositor thread is held in OnChannelConnected().
-      // We need to do this for cloned actors, too.
-      compositor->OnChannelConnected(base::GetProcId(aPeerProcess));
-      return compositor;
-    }
-  }
-  return nullptr;
-}
-
 static void
 UpdateIndirectTree(uint64_t aId, Layer* aRoot, const TargetConfig& aTargetConfig)
 {
   MonitorAutoLock lock(*sIndirectLayerTreesLock);
   sIndirectLayerTrees[aId].mRoot = aRoot;
   sIndirectLayerTrees[aId].mTargetConfig = aTargetConfig;
 }
 
@@ -2330,16 +2309,19 @@ CrossProcessCompositorParent::CloneTople
   for (unsigned int i = 0; i < aFds.Length(); i++) {
     if (aFds[i].protocolId() == (unsigned)GetProtocolId()) {
       Transport* transport = OpenDescriptor(aFds[i].fd(),
                                             Transport::MODE_SERVER);
       PCompositorParent* compositor =
         CompositorParent::Create(transport, base::GetProcId(aPeerProcess));
       compositor->CloneManagees(this, aCtx);
       compositor->IToplevelProtocol::SetTransport(transport);
+      // The reference to the compositor thread is held in OnChannelConnected().
+      // We need to do this for cloned actors, too.
+      compositor->OnChannelConnected(base::GetProcId(aPeerProcess));
       return compositor;
     }
   }
   return nullptr;
 }
 
 } // namespace layers
 } // namespace mozilla
--- a/gfx/layers/ipc/CompositorParent.h
+++ b/gfx/layers/ipc/CompositorParent.h
@@ -188,22 +188,16 @@ class CompositorParent final : public PC
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(CompositorParent)
   friend class CompositorVsyncScheduler;
 
 public:
   explicit CompositorParent(nsIWidget* aWidget,
                             bool aUseExternalSurfaceSize = false,
                             int aSurfaceWidth = -1, int aSurfaceHeight = -1);
 
-  // IToplevelProtocol::CloneToplevel()
-  virtual IToplevelProtocol*
-  CloneToplevel(const InfallibleTArray<mozilla::ipc::ProtocolFdMapping>& aFds,
-                base::ProcessHandle aPeerProcess,
-                mozilla::ipc::ProtocolCloneContext* aCtx) override;
-
   virtual bool RecvGetFrameUniformity(FrameUniformityData* aOutData) override;
   virtual bool RecvRequestOverfill() override;
   virtual bool RecvWillStop() override;
   virtual bool RecvStop() override;
   virtual bool RecvPause() override;
   virtual bool RecvResume() override;
   virtual bool RecvNotifyHidden(const uint64_t& id) override { return true; }
   virtual bool RecvNotifyVisible(const uint64_t& id) override { return true; }
--- a/ipc/glue/MessageChannel.h
+++ b/ipc/glue/MessageChannel.h
@@ -172,20 +172,22 @@ class MessageChannel : HasResultCodes
         return sIsPumpingMessages;
     }
     static void SetIsPumpingMessages(bool aIsPumping) {
         sIsPumpingMessages = aIsPumping;
     }
 
 #ifdef MOZ_NUWA_PROCESS
     void Block() {
+        MOZ_ASSERT(mLink);
         mLink->Block();
     }
 
     void Unblock() {
+        MOZ_ASSERT(mLink);
         mLink->Unblock();
     }
 #endif
 
 #ifdef OS_WIN
     struct MOZ_STACK_CLASS SyncStackFrame
     {
         SyncStackFrame(MessageChannel* channel, bool interrupt);
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -1284,25 +1284,16 @@ public class BrowserApp extends GeckoApp
             if (!TextUtils.isEmpty(text)) {
                 loadUrlOrKeywordSearch(text);
                 Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.CONTEXT_MENU);
                 Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.CONTEXT_MENU, "pasteandgo");
             }
             return true;
         }
 
-        if (itemId == R.id.site_settings) {
-            // This can be selected from either the browser menu or the contextmenu, depending on the size and version (v11+) of the phone.
-            GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Permissions:Get", null));
-            if (Versions.preHC) {
-                Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.CONTEXT_MENU, "site_settings");
-            }
-            return true;
-        }
-
         if (itemId == R.id.paste) {
             String text = Clipboard.getText();
             if (!TextUtils.isEmpty(text)) {
                 enterEditingMode(text);
                 showBrowserSearch();
                 mBrowserSearch.filter(text, null);
                 Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.CONTEXT_MENU, "paste");
             }
@@ -3169,17 +3160,16 @@ public class BrowserApp extends GeckoApp
             // NOTE: Use MenuUtils.safeSetEnabled because some actions might
             // be on the BrowserToolbar context menu.
             if (Versions.feature11Plus) {
                 // There is no page menu prior to v11 resources.
                 MenuUtils.safeSetEnabled(aMenu, R.id.page, false);
             }
             MenuUtils.safeSetEnabled(aMenu, R.id.subscribe, false);
             MenuUtils.safeSetEnabled(aMenu, R.id.add_search_engine, false);
-            MenuUtils.safeSetEnabled(aMenu, R.id.site_settings, false);
             MenuUtils.safeSetEnabled(aMenu, R.id.add_to_launcher, false);
 
             return true;
         }
 
         final boolean inGuestMode = GeckoProfile.get(this).inGuestMode();
 
         final boolean isAboutReader = AboutPages.isAboutReader(tab.getURL());
@@ -3255,17 +3245,16 @@ public class BrowserApp extends GeckoApp
 
         // NOTE: Use MenuUtils.safeSetEnabled because some actions might
         // be on the BrowserToolbar context menu.
         if (Versions.feature11Plus) {
             MenuUtils.safeSetEnabled(aMenu, R.id.page, !isAboutHome(tab));
         }
         MenuUtils.safeSetEnabled(aMenu, R.id.subscribe, tab.hasFeeds());
         MenuUtils.safeSetEnabled(aMenu, R.id.add_search_engine, tab.hasOpenSearch());
-        MenuUtils.safeSetEnabled(aMenu, R.id.site_settings, !isAboutHome(tab));
         MenuUtils.safeSetEnabled(aMenu, R.id.add_to_launcher, !isAboutHome(tab));
 
         // Action providers are available only ICS+.
         if (Versions.feature14Plus) {
             final GeckoActionProvider provider = ((GeckoMenuItem) share).getGeckoActionProvider();
             if (provider != null) {
                 Intent shareIntent = provider.getIntent();
 
--- a/mobile/android/base/resources/layout-large-v11/tab_strip_item_view.xml
+++ b/mobile/android/base/resources/layout-large-v11/tab_strip_item_view.xml
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <merge xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:gecko="http://schemas.android.com/apk/res-auto">
 
-   <ImageView
+   <ImageButton
         android:id="@+id/favicon"
         android:layout_width="@dimen/browser_toolbar_favicon_size"
         android:layout_height="match_parent"
         android:layout_marginRight="8dp"
         android:scaleType="centerInside"
         android:duplicateParentState="true"/>
 
     <org.mozilla.gecko.widget.FadedSingleColorTextView
--- a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml
@@ -69,19 +69,16 @@
                   android:title="@string/save_as_pdf"/>
 
             <item android:id="@+id/print"
                   android:title="@string/print"/>
 
             <item android:id="@+id/add_search_engine"
                   android:title="@string/contextmenu_add_search_engine"/>
 
-            <item android:id="@+id/site_settings"
-                  android:title="@string/contextmenu_site_settings" />
-
             <item android:id="@+id/add_to_launcher"
                   android:title="@string/contextmenu_add_to_launcher"/>
 
         </menu>
 
     </item>
 
     <item android:id="@+id/tools"
--- a/mobile/android/base/resources/menu-v11/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu-v11/browser_app_menu.xml
@@ -69,19 +69,16 @@
                   android:title="@string/save_as_pdf"/>
 
             <item android:id="@+id/print"
                   android:title="@string/print"/>
 
             <item android:id="@+id/add_search_engine"
                   android:title="@string/contextmenu_add_search_engine"/>
 
-            <item android:id="@+id/site_settings"
-                  android:title="@string/contextmenu_site_settings" />
-
             <item android:id="@+id/add_to_launcher"
                   android:title="@string/contextmenu_add_to_launcher"/>
 
         </menu>
 
     </item>
 
     <item android:id="@+id/tools"
--- a/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
+++ b/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml
@@ -70,19 +70,16 @@
                   android:title="@string/save_as_pdf"/>
 
             <item android:id="@+id/print"
                   android:title="@string/print"/>
 
             <item android:id="@+id/add_search_engine"
                   android:title="@string/contextmenu_add_search_engine"/>
 
-            <item android:id="@+id/site_settings"
-                  android:title="@string/contextmenu_site_settings" />
-
             <item android:id="@+id/add_to_launcher"
                   android:title="@string/contextmenu_add_to_launcher"/>
 
         </menu>
 
     </item>
 
     <item android:id="@+id/tools"
--- a/mobile/android/base/resources/menu/titlebar_contextmenu.xml
+++ b/mobile/android/base/resources/menu/titlebar_contextmenu.xml
@@ -15,15 +15,12 @@
           android:title="@string/contextmenu_subscribe"/>
 
     <item android:id="@+id/add_search_engine"
           android:title="@string/contextmenu_add_search_engine"/>
 
     <item android:id="@+id/copyurl"
           android:title="@string/contextmenu_copyurl"/>
 
-    <item android:id="@+id/site_settings"
-          android:title="@string/contextmenu_site_settings" />
-
     <item android:id="@+id/add_to_launcher"
           android:title="@string/contextmenu_add_to_launcher"/>
 
 </menu>
--- a/mobile/android/tests/browser/robocop/StringHelper.java
+++ b/mobile/android/tests/browser/robocop/StringHelper.java
@@ -11,16 +11,18 @@ import org.mozilla.gecko.R;
 
 public class StringHelper {
     private static StringHelper instance;
 
     // This needs to be accessed statically, before an instance of StringHelper can be created.
     public static String STATIC_ABOUT_HOME_URL = "about:home";
 
     public final String OK;
+    public final String CANCEL;
+    public final String CLEAR;
 
     // Note: DEFAULT_BOOKMARKS_TITLES.length == DEFAULT_BOOKMARKS_URLS.length
     public final String[] DEFAULT_BOOKMARKS_TITLES;
     public final String[] DEFAULT_BOOKMARKS_URLS;
     public final int DEFAULT_BOOKMARKS_COUNT;
 
     // About pages
     public final String ABOUT_BLANK_URL = "about:blank";
@@ -290,16 +292,18 @@ public class StringHelper {
     // Restore Tabs Settings
     public final String DONT_RESTORE_TABS;
     public final String ALWAYS_RESTORE_TABS;
     public final String DONT_RESTORE_QUIT;
 
     private StringHelper(final Resources res) {
 
         OK = res.getString(R.string.button_ok);
+        CANCEL = res.getString(R.string.button_cancel);
+        CLEAR = res.getString(R.string.button_clear);
 
         // Note: DEFAULT_BOOKMARKS_TITLES.length == DEFAULT_BOOKMARKS_URLS.length
         DEFAULT_BOOKMARKS_TITLES = new String[] {
                 res.getString(R.string.bookmarkdefaults_title_aboutfirefox),
                 res.getString(R.string.bookmarkdefaults_title_support),
                 res.getString(R.string.bookmarkdefaults_title_addons)
         };
         DEFAULT_BOOKMARKS_URLS = new String[] {
--- a/mobile/android/tests/browser/robocop/components/ToolbarComponent.java
+++ b/mobile/android/tests/browser/robocop/components/ToolbarComponent.java
@@ -5,17 +5,16 @@
 package org.mozilla.gecko.tests.components;
 
 import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals;
 import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertFalse;
 import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull;
 import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue;
 
 import org.mozilla.gecko.R;
-import org.mozilla.gecko.tests.StringHelper;
 import org.mozilla.gecko.tests.UITestContext;
 import org.mozilla.gecko.tests.helpers.DeviceHelper;
 import org.mozilla.gecko.tests.helpers.NavigationHelper;
 import org.mozilla.gecko.tests.helpers.WaitHelper;
 import org.mozilla.gecko.toolbar.PageActionLayout;
 
 import android.view.View;
 import android.widget.EditText;
--- a/mobile/android/tests/browser/robocop/testClearPrivateData.java
+++ b/mobile/android/tests/browser/robocop/testClearPrivateData.java
@@ -3,16 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.tests;
 
 import org.mozilla.gecko.R;
 
 import com.jayway.android.robotium.solo.Condition;
 import android.view.View;
+import android.widget.ImageButton;
 
 /**
  * This patch tests the clear private data options:
  * - clear history option by: adding and checking that clear private
  * data option removes the history items but not the users bookmarks
  * - clear site settings and clear saved password by: checking
  * each option present in the doorhanger and clearing the settings from
  * the URL bar context menu and settings menu
@@ -58,34 +59,32 @@ public class testClearPrivateData extend
             public boolean isSatisfied() {
                 return mDatabaseHelper.getBrowserDBUrls(DatabaseHelper.BrowserDataType.HISTORY).size() == expectedCount;
             }
         }, TEST_WAIT_MS);
         mAsserter.ok(match, "Checking that the number of history items is correct", String.valueOf(expectedCount) + " history items present in the database");
     }
 
     public void clearSiteSettings() {
-        String shareStrings[] = {"Share your location with", "Share", "Don't share", "There are no settings to clear"};
         String titleGeolocation = mStringHelper.ROBOCOP_GEOLOCATION_TITLE;
         String url = getAbsoluteUrl(mStringHelper.ROBOCOP_GEOLOCATION_URL);
-        loadCheckDismiss(shareStrings[1], url, shareStrings[0]);
-        checkOption(shareStrings[1], "Clear");
-        checkOption(shareStrings[3], "Cancel");
-        loadCheckDismiss(shareStrings[2], url, shareStrings[0]);
-        checkOption(shareStrings[2], "Cancel");
+        loadCheckDismiss(mStringHelper.GEO_ALLOW, url, mStringHelper.GEO_MESSAGE);
+        checkOption(mStringHelper.GEO_ALLOW, mStringHelper.CLEAR);
+        loadCheckDismiss(mStringHelper.GEO_DENY, url, mStringHelper.GEO_MESSAGE);
+        checkOption(mStringHelper.GEO_DENY, mStringHelper.CANCEL);
         checkDevice(titleGeolocation, url);
     }
 
     public void clearPassword(){
         String passwordStrings[] = { mStringHelper.LOGIN_MESSAGE, mStringHelper.LOGIN_ALLOW, mStringHelper.LOGIN_DENY };
         String title = mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE;
         String loginUrl = getAbsoluteUrl(mStringHelper.ROBOCOP_LOGIN_01_URL);
 
         loadCheckDismiss(passwordStrings[1], loginUrl, passwordStrings[0]);
-        checkOption(mStringHelper.CONTEXT_MENU_SITE_SETTINGS_SAVE_PASSWORD, "Clear");
+        checkOption(mStringHelper.CONTEXT_MENU_SITE_SETTINGS_SAVE_PASSWORD, mStringHelper.CLEAR);
         loadCheckDismiss(passwordStrings[2], loginUrl, passwordStrings[0]);
         checkDevice(title, getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL));
     }
 
     // clear private data and verify the device type because for phone there is an extra back action to exit the settings menu
     public void checkDevice(final String title, final String url) {
         clearPrivateData();
         if (mDevice.type.equals("phone")) {
@@ -109,17 +108,28 @@ public class testClearPrivateData extend
     public void checkOption(String option, String button) {
         if (mDevice.version.equals("2.x")) {
             // Use the context menu in pre-11
             final View toolbarView = mSolo.getView(R.id.browser_toolbar);
             mSolo.clickLongOnView(toolbarView);
             mAsserter.ok(waitForText(mStringHelper.CONTEXT_MENU_ITEMS_IN_URL_BAR[2]), "Waiting for the pop-up to open", "Pop up was opened");
         } else {
             // Use the Page menu in 11+
-            selectMenuItem(mStringHelper.PAGE_LABEL);
-            mAsserter.ok(waitForText(mStringHelper.CONTEXT_MENU_ITEMS_IN_URL_BAR[2]), "Waiting for the submenu to open", "Submenu was opened");
+            openSiteSecurityDoorHanger();
+            mAsserter.ok(waitForText(mStringHelper.CONTEXT_MENU_ITEMS_IN_URL_BAR[2]), "Waiting for the submenu to open for " + option + " on " + button, "Submenu was opened");
         }
 
-	mSolo.clickOnText(mStringHelper.CONTEXT_MENU_ITEMS_IN_URL_BAR[2]);
+        mSolo.clickOnText(mStringHelper.CONTEXT_MENU_ITEMS_IN_URL_BAR[2]);
         mAsserter.ok(waitForText(option), "Verify that the option: " + option + " is in the list", "The option is in the list. There are settings to clear");
         mSolo.clickOnButton(button);
     }
+
+    private void openSiteSecurityDoorHanger() {
+        mSolo.waitForCondition(new Condition() {
+            @Override
+            public boolean isSatisfied() {
+                ImageButton btn = (ImageButton) mSolo.getView(R.id.favicon);
+                mSolo.clickOnView(btn);
+                return true;
+            }
+        }, TEST_WAIT_MS);
+    }
 }
--- a/toolkit/components/alerts/nsAlertsService.cpp
+++ b/toolkit/components/alerts/nsAlertsService.cpp
@@ -20,17 +20,17 @@
 #include "nsToolkitCompsCID.h"
 
 #endif // !MOZ_WIDGET_ANDROID
 
 using namespace mozilla;
 
 using mozilla::dom::ContentChild;
 
-NS_IMPL_ISUPPORTS(nsAlertsService, nsIAlertsService, nsIAlertsProgressListener)
+NS_IMPL_ISUPPORTS(nsAlertsService, nsIAlertsService, nsIAlertsDoNotDisturb, nsIAlertsProgressListener)
 
 nsAlertsService::nsAlertsService()
 {
 }
 
 nsAlertsService::~nsAlertsService()
 {}
 
@@ -145,16 +145,55 @@ NS_IMETHODIMP nsAlertsService::CloseAler
     return sysAlerts->CloseAlert(aAlertName, nullptr);
   }
 
   return mXULAlerts.CloseAlert(aAlertName);
 #endif // !MOZ_WIDGET_ANDROID
 }
 
 
+// nsIAlertsDoNotDisturb
+NS_IMETHODIMP nsAlertsService::GetManualDoNotDisturb(bool* aRetVal)
+{
+#ifdef MOZ_WIDGET_ANDROID
+  return NS_ERROR_NOT_IMPLEMENTED;
+#else
+  // Try the system notification service.
+  nsCOMPtr<nsIAlertsService> sysAlerts(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID));
+  if (sysAlerts) {
+    nsCOMPtr<nsIAlertsDoNotDisturb> alertsDND(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID));
+    if (!alertsDND) {
+      return NS_ERROR_NOT_IMPLEMENTED;
+    }
+    return alertsDND->GetManualDoNotDisturb(aRetVal);
+  }
+
+  return mXULAlerts.GetManualDoNotDisturb(aRetVal);
+#endif
+}
+
+NS_IMETHODIMP nsAlertsService::SetManualDoNotDisturb(bool aDoNotDisturb)
+{
+#ifdef MOZ_WIDGET_ANDROID
+  return NS_ERROR_NOT_IMPLEMENTED;
+#else
+  // Try the system notification service.
+  nsCOMPtr<nsIAlertsService> sysAlerts(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID));
+  if (sysAlerts) {
+    nsCOMPtr<nsIAlertsDoNotDisturb> alertsDND(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID));
+    if (!alertsDND) {
+      return NS_ERROR_NOT_IMPLEMENTED;
+    }
+    return alertsDND->SetManualDoNotDisturb(aDoNotDisturb);
+  }
+
+  return mXULAlerts.SetManualDoNotDisturb(aDoNotDisturb);
+#endif
+}
+
 NS_IMETHODIMP nsAlertsService::OnProgress(const nsAString & aAlertName,
                                           int64_t aProgress,
                                           int64_t aProgressMax,
                                           const nsAString & aAlertText)
 {
 #ifdef MOZ_WIDGET_ANDROID
   widget::GeckoAppShell::AlertsProgressListener_OnProgress(aAlertName,
                                                            aProgress, aProgressMax,
--- a/toolkit/components/alerts/nsAlertsService.h
+++ b/toolkit/components/alerts/nsAlertsService.h
@@ -23,20 +23,22 @@ typedef enum tagMOZ_QUERY_USER_NOTIFICAT
 
 extern "C" {
 // This function is Windows Vista or later
 typedef HRESULT (__stdcall *SHQueryUserNotificationStatePtr)(MOZ_QUERY_USER_NOTIFICATION_STATE *pquns);
 }
 #endif // defined(XP_WIN)
 
 class nsAlertsService : public nsIAlertsService,
+                        public nsIAlertsDoNotDisturb,
                         public nsIAlertsProgressListener
 {
 public:
   NS_DECL_NSIALERTSPROGRESSLISTENER
+  NS_DECL_NSIALERTSDONOTDISTURB
   NS_DECL_NSIALERTSSERVICE
   NS_DECL_ISUPPORTS
 
   nsAlertsService();
 
 protected:
   virtual ~nsAlertsService();
 
--- a/toolkit/components/alerts/nsIAlertsService.idl
+++ b/toolkit/components/alerts/nsIAlertsService.idl
@@ -1,110 +1,127 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-
 #include "nsISupports.idl"
 #include "nsIObserver.idl"
 
 interface nsIPrincipal;
 
 [scriptable, uuid(9d0284bf-db40-42da-8f0d-c2769dbde7aa)]
 interface nsIAlertsService : nsISupports
 {
-   /**
-    * Displays a sliding notification window.
-    *
-    * @param imageUrl       A URL identifying the image to put in the alert.
-    *                       The OS X implemenation limits the amount of time it
-    *                       will wait for an icon to load to six seconds. After
-    *                       that time the alert will show with no icon.
-    * @param title          The title for the alert.
-    * @param text           The contents of the alert.
-    * @param textClickable  If true, causes the alert text to look like a link
-    *                       and notifies the listener when user attempts to 
-    *                       click the alert text.
-    * @param cookie         A blind cookie the alert will pass back to the 
-    *                       consumer during the alert listener callbacks.
-    * @param alertListener  Used for callbacks. May be null if the caller 
-    *                       doesn't care about callbacks.
-    * @param name           The name of the notification. This is currently only
-    *                       used on Android and OS X. On Android the name is
-    *                       hashed and used as a notification ID. Notifications
-    *                       will replace previous notifications with the same name.
-    * @param dir            Bidi override for the title. Valid values are
-    *                       "auto", "ltr" or "rtl". Only available on supported
-    *                       platforms.
-    * @param lang           Language of title and text of the alert. Only available
-    *                       on supported platforms.
-    * @param inPrivateBrowsing If set to true, imageUrl will be loaded in private
-    *                          browsing mode.
-    * @throws NS_ERROR_NOT_AVAILABLE If the notification cannot be displayed.
-    *
-    * The following arguments will be passed to the alertListener's observe() 
-    * method:
-    *   subject - null
-    *   topic   - "alertfinished" when the alert goes away
-    *             "alertclickcallback" when the text is clicked
-    *             "alertshow" when the alert is shown
-    *   data    - the value of the cookie parameter passed to showAlertNotification.
-    *
-    * @note Depending on current circumstances (if the user's in a fullscreen
-    *       application, for instance), the alert might not be displayed at all.
-    *       In that case, if an alert listener is passed in it will receive the
-    *       "alertfinished" notification immediately.
-    */
-   void showAlertNotification(in AString  imageUrl,
-                              in AString  title,
-                              in AString  text,
-                              [optional] in boolean textClickable,
-                              [optional] in AString cookie,
-                              [optional] in nsIObserver alertListener,
-                              [optional] in AString name,
-                              [optional] in AString dir,
-                              [optional] in AString lang,
-                              [optional] in AString data,
-                              [optional] in nsIPrincipal principal,
-                              [optional] in boolean inPrivateBrowsing);
+  /**
+   * Displays a sliding notification window.
+   *
+   * @param imageUrl       A URL identifying the image to put in the alert.
+   *                       The OS X implemenation limits the amount of time it
+   *                       will wait for an icon to load to six seconds. After
+   *                       that time the alert will show with no icon.
+   * @param title          The title for the alert.
+   * @param text           The contents of the alert.
+   * @param textClickable  If true, causes the alert text to look like a link
+   *                       and notifies the listener when user attempts to
+   *                       click the alert text.
+   * @param cookie         A blind cookie the alert will pass back to the
+   *                       consumer during the alert listener callbacks.
+   * @param alertListener  Used for callbacks. May be null if the caller
+   *                       doesn't care about callbacks.
+   * @param name           The name of the notification. This is currently only
+   *                       used on Android and OS X. On Android the name is
+   *                       hashed and used as a notification ID. Notifications
+   *                       will replace previous notifications with the same name.
+   * @param dir            Bidi override for the title. Valid values are
+   *                       "auto", "ltr" or "rtl". Only available on supported
+   *                       platforms.
+   * @param lang           Language of title and text of the alert. Only available
+   *                       on supported platforms.
+   * @param inPrivateBrowsing If set to true, imageUrl will be loaded in private
+   *                          browsing mode.
+   * @throws NS_ERROR_NOT_AVAILABLE If the notification cannot be displayed.
+   *
+   * The following arguments will be passed to the alertListener's observe()
+   * method:
+   *   subject - null
+   *   topic   - "alertfinished" when the alert goes away
+   *             "alertdisablecallback" when alerts should be disabled for the principal
+   *             "alertsettingscallback" when alert settings should be opened
+   *             "alertclickcallback" when the text is clicked
+   *             "alertshow" when the alert is shown
+   *   data    - the value of the cookie parameter passed to showAlertNotification.
+   *
+   * @note Depending on current circumstances (if the user's in a fullscreen
+   *       application, for instance), the alert might not be displayed at all.
+   *       In that case, if an alert listener is passed in it will receive the
+   *       "alertfinished" notification immediately.
+   */
+  void showAlertNotification(in AString  imageUrl,
+                             in AString  title,
+                             in AString  text,
+                             [optional] in boolean textClickable,
+                             [optional] in AString cookie,
+                             [optional] in nsIObserver alertListener,
+                             [optional] in AString name,
+                             [optional] in AString dir,
+                             [optional] in AString lang,
+                             [optional] in AString data,
+                             [optional] in nsIPrincipal principal,
+                             [optional] in boolean inPrivateBrowsing);
 
-   /**
-    * Close alerts created by the service.
-    *
-    * @param name           The name of the notification to close. If no name
-    *                       is provided then only a notification created with
-    *                       no name (if any) will be closed.
-    */
-   void closeAlert([optional] in AString name,
-                   [optional] in nsIPrincipal principal);
+  /**
+   * Close alerts created by the service.
+   *
+   * @param name           The name of the notification to close. If no name
+   *                       is provided then only a notification created with
+   *                       no name (if any) will be closed.
+   */
+  void closeAlert([optional] in AString name,
+                  [optional] in nsIPrincipal principal);
+
+};
+
+[scriptable, uuid(c5d63e3a-259d-45a8-b964-8377967cb4d2)]
+interface nsIAlertsDoNotDisturb : nsISupports
+{
+  /**
+   * Toggles a manual Do Not Disturb mode for the service to reduce the amount
+   * of disruption that alerts cause the user.
+   * This may mean only displaying them in a notification tray/center or not
+   * displaying them at all. If a system backend already supports a similar
+   * feature controlled by the user, enabling this may not have any impact on
+   * code to show an alert. e.g. on OS X, the system will take care not
+   * disrupting a user if we simply create a notification like usual.
+   */
+  attribute bool manualDoNotDisturb;
 };
 
 [scriptable, uuid(df1bd4b0-3a8c-40e6-806a-203f38b0bd9f)]
 interface nsIAlertsProgressListener : nsISupports
 {
-    /**
-     * Called to notify the alert service that progress has occurred for the
-     * given notification previously displayed with showAlertNotification().
-     *
-     * @param name         The name of the notification displaying the
-     *                     progress. On Android the name is hashed and used
-     *                     as a notification ID.
-     * @param progress     Numeric value in the range 0 to progressMax
-     *                     indicating the current progress.
-     * @param progressMax  Numeric value indicating the maximum progress.
-     * @param text         The contents of the alert. If not provided,
-     *                     the percentage will be displayed.
-     */
-    void onProgress(in AString name,
-                    in long long progress,
-                    in long long progressMax,
-                    [optional] in AString text);
+  /**
+   * Called to notify the alert service that progress has occurred for the
+   * given notification previously displayed with showAlertNotification().
+   *
+   * @param name         The name of the notification displaying the
+   *                     progress. On Android the name is hashed and used
+   *                     as a notification ID.
+   * @param progress     Numeric value in the range 0 to progressMax
+   *                     indicating the current progress.
+   * @param progressMax  Numeric value indicating the maximum progress.
+   * @param text         The contents of the alert. If not provided,
+   *                     the percentage will be displayed.
+   */
+  void onProgress(in AString name,
+                  in long long progress,
+                  in long long progressMax,
+                  [optional] in AString text);
 
-    /**
-     * Called to cancel and hide the given notification previously displayed
-     * with showAlertNotification().
-     *
-     * @param name         The name of the notification.
-     */
-    void onCancel(in AString name);
+  /**
+   * Called to cancel and hide the given notification previously displayed
+   * with showAlertNotification().
+   *
+   * @param name         The name of the notification.
+   */
+  void onCancel(in AString name);
 };
 
--- a/toolkit/components/alerts/nsXULAlerts.cpp
+++ b/toolkit/components/alerts/nsXULAlerts.cpp
@@ -43,16 +43,20 @@ nsXULAlertObserver::Observe(nsISupports*
 nsresult
 nsXULAlerts::ShowAlertNotification(const nsAString& aImageUrl, const nsAString& aAlertTitle,
                                    const nsAString& aAlertText, bool aAlertTextClickable,
                                    const nsAString& aAlertCookie, nsIObserver* aAlertListener,
                                    const nsAString& aAlertName, const nsAString& aBidi,
                                    const nsAString& aLang, nsIPrincipal* aPrincipal,
                                    bool aInPrivateBrowsing)
 {
+  if (mDoNotDisturb) {
+    return NS_OK;
+  }
+
   nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
 
   nsCOMPtr<nsISupportsArray> argsArray;
   nsresult rv = NS_NewISupportsArray(getter_AddRefs(argsArray));
   NS_ENSURE_SUCCESS(rv, rv);
 
   // create scriptable versions of our strings that we can store in our nsISupportsArray....
   nsCOMPtr<nsISupportsString> scriptableImageUrl (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
@@ -157,16 +161,30 @@ nsXULAlerts::ShowAlertNotification(const
 
   mNamedWindows.Put(aAlertName, newWindow);
   alertObserver->SetAlertWindow(newWindow);
 
   return NS_OK;
 }
 
 nsresult
+nsXULAlerts::SetManualDoNotDisturb(bool aDoNotDisturb)
+{
+  mDoNotDisturb = aDoNotDisturb;
+  return NS_OK;
+}
+
+nsresult
+nsXULAlerts::GetManualDoNotDisturb(bool* aRetVal)
+{
+  *aRetVal = mDoNotDisturb;
+  return NS_OK;
+}
+
+nsresult
 nsXULAlerts::CloseAlert(const nsAString& aAlertName)
 {
   nsIDOMWindow* alert = mNamedWindows.GetWeak(aAlertName);
   nsCOMPtr<nsPIDOMWindow> domWindow = do_QueryInterface(alert);
   if (domWindow) {
     MOZ_ASSERT(domWindow->IsOuterWindow());
     domWindow->DispatchCustomEvent(NS_LITERAL_STRING("XULAlertClose"));
   }
--- a/toolkit/components/alerts/nsXULAlerts.h
+++ b/toolkit/components/alerts/nsXULAlerts.h
@@ -24,18 +24,23 @@ public:
   nsresult ShowAlertNotification(const nsAString& aImageUrl, const nsAString& aAlertTitle,
                                  const nsAString& aAlertText, bool aAlertTextClickable,
                                  const nsAString& aAlertCookie, nsIObserver* aAlertListener,
                                  const nsAString& aAlertName, const nsAString& aBidi,
                                  const nsAString& aLang, nsIPrincipal* aPrincipal,
                                  bool aInPrivateBrowsing);
 
   nsresult CloseAlert(const nsAString& aAlertName);
+
+  nsresult GetManualDoNotDisturb(bool* aRetVal);
+  nsresult SetManualDoNotDisturb(bool aDoNotDisturb);
+
 protected:
   nsInterfaceHashtable<nsStringHashKey, nsIDOMWindow> mNamedWindows;
+  bool mDoNotDisturb = false;
 };
 
 /**
  * This class wraps observers for alerts and watches
  * for the "alertfinished" event in order to release
  * the reference on the nsIDOMWindow of the XUL alert.
  */
 class nsXULAlertObserver : public nsIObserver {
--- a/toolkit/components/passwordmgr/content/passwordManager.js
+++ b/toolkit/components/passwordmgr/content/passwordManager.js
@@ -154,16 +154,18 @@ function LoadSignons() {
 
   return true;
 }
 
 function SignonSelected() {
   var selections = GetTreeSelections(signonsTree);
   if (selections.length) {
     document.getElementById("removeSignon").removeAttribute("disabled");
+  } else {
+    document.getElementById("removeSignon").setAttribute("disabled", true);
   }
 }
 
 function DeleteSignon() {
   var syncNeeded = (signonsTreeView._filterSet.length != 0);
   DeleteSelectedItemFromTree(signonsTree, signonsTreeView,
                              signonsTreeView._filterSet.length ? signonsTreeView._filterSet : signons,
                              deletedSignons, "removeSignon", "removeAllSignons");
--- a/toolkit/components/telemetry/Makefile.in
+++ b/toolkit/components/telemetry/Makefile.in
@@ -1,23 +1,16 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 USE_RCS_MK := 1
 include $(topsrcdir)/config/makefiles/rcs.mk
 
-ifdef MOZILLA_OFFICIAL
-MOZ_HISTOGRAMS_VERSION ?= $(call getSourceRepo)/rev/$(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null))
-ifdef MOZ_HISTOGRAMS_VERSION
-DEFINES += -DHISTOGRAMS_FILE_VERSION='$(MOZ_HISTOGRAMS_VERSION)'
-endif
-endif
-
 INSTALL_TARGETS += histoenums
 histoenums_FILES := TelemetryHistogramEnums.h
 histoenums_DEST = $(DIST)/include/mozilla
 histoenums_TARGET := export
 
 include $(topsrcdir)/config/rules.mk
 
 # This is so hacky. Waiting on bug 988938.
--- a/toolkit/components/telemetry/TelemetrySession.jsm
+++ b/toolkit/components/telemetry/TelemetrySession.jsm
@@ -42,20 +42,16 @@ const REASON_TEST_PING = "test-ping";
 const REASON_ENVIRONMENT_CHANGE = "environment-change";
 const REASON_SHUTDOWN = "shutdown";
 
 const ENVIRONMENT_CHANGE_LISTENER = "TelemetrySession::onEnvironmentChange";
 
 const MS_IN_ONE_HOUR  = 60 * 60 * 1000;
 const MIN_SUBSESSION_LENGTH_MS = Preferences.get("toolkit.telemetry.minSubsessionLength", 10 * 60) * 1000;
 
-// This is the HG changeset of the Histogram.json file, used to associate
-// submitted ping data with its histogram definition (bug 832007)
-#expand const HISTOGRAMS_FILE_VERSION = "__HISTOGRAMS_FILE_VERSION__";
-
 const LOGGER_NAME = "Toolkit.Telemetry";
 const LOGGER_PREFIX = "TelemetrySession" + (Utils.isContentProcess ? "#content::" : "::");
 
 const PREF_BRANCH = "toolkit.telemetry.";
 const PREF_PREVIOUS_BUILDID = PREF_BRANCH + "previousBuildID";
 const PREF_FHR_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
 const PREF_ASYNC_PLUGIN_INIT = "dom.ipc.plugins.asyncInit.enabled";
 const PREF_UNIFIED = PREF_BRANCH + "unified";
@@ -1039,17 +1035,17 @@ var Impl = {
     this._log.trace("getMetadata - Reason " + reason);
 
     const sessionStartDate = toLocalTimeISOString(Utils.truncateToDays(this._sessionStartDate));
     const subsessionStartDate = toLocalTimeISOString(Utils.truncateToDays(this._subsessionStartDate));
     const monotonicNow = Policy.monotonicNow();
 
     let ret = {
       reason: reason,
-      revision: HISTOGRAMS_FILE_VERSION,
+      revision: AppConstants.SOURCE_REVISION_URL,
       asyncPluginInit: Preferences.get(PREF_ASYNC_PLUGIN_INIT, false),
 
       // Date.getTimezoneOffset() unintuitively returns negative values if we are ahead of
       // UTC and vice versa (e.g. -60 for UTC+1). We invert the sign here.
       timezoneOffset: -this._subsessionStartDate.getTimezoneOffset(),
       previousBuildId: this._previousBuildId,
 
       sessionId: this._sessionId,
--- a/toolkit/components/telemetry/moz.build
+++ b/toolkit/components/telemetry/moz.build
@@ -31,27 +31,24 @@ EXTRA_COMPONENTS += [
 
 EXTRA_JS_MODULES += [
     'TelemetryArchive.jsm',
     'TelemetryController.jsm',
     'TelemetryEnvironment.jsm',
     'TelemetryLog.jsm',
     'TelemetryReportingPolicy.jsm',
     'TelemetrySend.jsm',
+    'TelemetrySession.jsm',
     'TelemetryStopwatch.jsm',
     'TelemetryStorage.jsm',
     'TelemetryUtils.jsm',
     'ThirdPartyCookieProbe.jsm',
     'UITelemetry.jsm',
 ]
 
-EXTRA_PP_JS_MODULES += [
-    'TelemetrySession.jsm',
-]
-
 TESTING_JS_MODULES += [
   'tests/unit/TelemetryArchiveTesting.jsm',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
--- a/toolkit/locales/en-US/chrome/global/devtools/gclicommands.properties
+++ b/toolkit/locales/en-US/chrome/global/devtools/gclicommands.properties
@@ -1599,16 +1599,20 @@ securityCSPHeaderOnPage=Content-Security
 securityCSPROHeaderOnPage=Content-Security-Policy-Report-Only for
 # Referrer Policy specific
 securityReferrerPolicyDesc=Display the current Referrer Policy
 securityReferrerPolicyManual=Display the Referrer Policy for the current page with example referrers for different URIs.
 securityReferrerNextURI=When Visiting
 securityReferrerCalculatedReferrer=Referrer Will Be
 # LOCALIZATION NOTE: %1$S is the current page URI
 securityReferrerPolicyReportHeader=Referrer Policy for %1$S
+securityReferrerPolicyOtherDomain=Other Origin
+securityReferrerPolicyOtherDomainDowngrade=Other Origin HTTP
+securityReferrerPolicySameDomain=Same Origin
+securityReferrerPolicySameDomainDowngrade=Same Host HTTP
 
 # LOCALIZATION NOTE (rulersDesc) A very short description of the
 # 'rulers' command. See rulersManual for a fuller description of what
 # it does. This string is designed to be shown in a menu alongside the
 # command name, which is why it should be as short as possible.
 rulersDesc=Toggle rulers for the page
 
 # LOCALIZATION NOTE (rulersManual) A fuller description of the 'rulers'
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -218,10 +218,15 @@ this.AppConstants = Object.freeze({
   ANDROID_PACKAGE_NAME: "@ANDROID_PACKAGE_NAME@",
 
   MOZ_ANDROID_APZ:
 #ifdef MOZ_ANDROID_APZ
     true,
 #else
     false,
 #endif
-  DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@"
+  DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@",
+
+  // URL to the hg revision this was built from (e.g.
+  // "https://hg.mozilla.org/mozilla-central/rev/6256ec9113c1")
+  // On unofficial builds, this is an empty string.
+  SOURCE_REVISION_URL: "@SOURCE_REV_URL@"
 });
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -102,15 +102,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'wind
 
 for var in ('ANDROID_PACKAGE_NAME',
             'MOZ_APP_NAME',
             'MOZ_APP_VERSION',
             'MOZ_APP_VERSION_DISPLAY',
             'MOZ_WIDGET_TOOLKIT',
             'DLL_PREFIX',
             'DLL_SUFFIX',
-            'DEBUG_JS_MODULES'):
+            'DEBUG_JS_MODULES',
+            'SOURCE_REV_URL'):
             DEFINES[var] = CONFIG[var]
 
 for var in ('MOZ_TOOLKIT_SEARCH',
             'MOZ_UPDATER'):
     if CONFIG[var]:
         DEFINES[var] = True
--- a/widget/NativeKeyToDOMKeyName.h
+++ b/widget/NativeKeyToDOMKeyName.h
@@ -1300,16 +1300,25 @@ KEY_MAP_QT      (ZoomToggle, Qt::Key_Zoo
 
 // HomeScreen
 KEY_MAP_ANDROID (HomeScreen, AKEYCODE_HOME)
 
 // Focus
 KEY_MAP_QT      (CameraFocusAdjust, Qt::Key_CameraFocus)
 KEY_MAP_ANDROID (CameraFocusAdjust, AKEYCODE_FOCUS)
 
+// PhoneCall
+KEY_MAP_ANDROID (PhoneCall, AKEYCODE_CALL)
+
+// SoftLeft
+KEY_MAP_ANDROID (SoftLeft, AKEYCODE_SOFT_LEFT)
+
+// SoftRight
+KEY_MAP_ANDROID (SoftRight, AKEYCODE_SOFT_RIGHT)
+
 #undef KEY_MAP_WIN
 #undef KEY_MAP_WIN_JPN
 #undef KEY_MAP_WIN_KOR
 #undef KEY_MAP_WIN_OTH
 #undef KEY_MAP_WIN_CMD
 #undef KEY_MAP_COCOA
 #undef KEY_MAP_GTK
 #undef KEY_MAP_QT
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1490,19 +1490,16 @@ ConvertAndroidKeyCodeToKeyNameIndex(Andr
         case AKEYCODE_NUMPAD_EQUALS:
         case AKEYCODE_NUMPAD_LEFT_PAREN:
         case AKEYCODE_NUMPAD_RIGHT_PAREN:
 
         case AKEYCODE_YEN:                // yen sign key
         case AKEYCODE_RO:                 // Japanese Ro key
             return KEY_NAME_INDEX_USE_STRING;
 
-        case AKEYCODE_SOFT_LEFT:
-        case AKEYCODE_SOFT_RIGHT:
-        case AKEYCODE_CALL:
         case AKEYCODE_ENDCALL:
         case AKEYCODE_NUM:                // XXX Not sure
         case AKEYCODE_HEADSETHOOK:
         case AKEYCODE_NOTIFICATION:       // XXX Not sure
         case AKEYCODE_PICTSYMBOLS:
 
         case AKEYCODE_BUTTON_A:
         case AKEYCODE_BUTTON_B:
--- a/xpcom/threads/TimerThread.cpp
+++ b/xpcom/threads/TimerThread.cpp
@@ -425,17 +425,21 @@ TimerThread::Run()
   bool forceRunNextTimer = false;
 
   while (!mShutdown) {
     // Have to use PRIntervalTime here, since PR_WaitCondVar takes it
     PRIntervalTime waitFor;
     bool forceRunThisTimer = forceRunNextTimer;
     forceRunNextTimer = false;
 
-    if (mSleeping) {
+    if (mSleeping
+#ifdef MOZ_NUWA_PROCESS
+        || IsNuwaProcess() // Don't fire timers or deadlock will result.
+#endif
+        ) {
       // Sleep for 0.1 seconds while not firing timers.
       uint32_t milliseconds = 100;
       if (ChaosMode::isActive(ChaosFeature::TimerScheduling)) {
         milliseconds = ChaosMode::randomUint32LessThan(200);
       }
       waitFor = PR_MillisecondsToInterval(milliseconds);
     } else {
       waitFor = PR_INTERVAL_NO_TIMEOUT;