Merge b2ginbound to central, a=merge
authorWes Kocher <wkocher@mozilla.com>
Wed, 05 Aug 2015 16:45:41 -0700
changeset 288043 07befc6f54e743b8be189cd2c14d74cf1bcef1c2
parent 288001 9801f91760d99bbedb99b3346c8aeb57db68c93a (current diff)
parent 288042 5ff1408a3462509996b99fad95c95ec7862da974 (diff)
child 288046 471a193eb978cd7d75cf95607830c8cb80ac2c2b
child 288075 763c44dea64ee02fae5cd7d106e3dbd7d4d94226
child 288127 888019c4ff5b8338e9444efd8e3fa4e161d89a14
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone42.0a1
first release with
nightly linux32
07befc6f54e7 / 42.0a1 / 20150806030205 / files
nightly linux64
07befc6f54e7 / 42.0a1 / 20150806030205 / files
nightly mac
07befc6f54e7 / 42.0a1 / 20150806030205 / files
nightly win32
07befc6f54e7 / 42.0a1 / 20150806030205 / files
nightly win64
07befc6f54e7 / 42.0a1 / 20150806030205 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge b2ginbound to central, a=merge
--- a/b2g/config/aries/sources.xml
+++ b/b2g/config/aries/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="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="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2d58f4b9206b50b8fda0d5036da6f0c62608db7c"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="d70e4bfdcb65e7514de0f9315b74aea1c811678d"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="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="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
@@ -132,19 +132,19 @@
   <project name="platform/system/media" path="system/media" revision="70bfebc66d9c6a4c614a8c7efde90e8e7e1d8641"/>
   <project name="platform/system/netd" path="system/netd" revision="d113f0ceefa9ce29eb3c86e2d23c7417a70b4048"/>
   <project name="platform/system/security" path="system/security" revision="94e1617f6f2bc2286d005e79cffa6bf0721b06b3"/>
   <project name="platform/system/vold" path="system/vold" revision="c065e301e38ea0c241164e2a373e1ecefbeaf2ec"/>
   <project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="e372b6a77f71c8f9fbbf6f8adbfa7bf8ef45dc60"/>
   <project name="platform_frameworks_base" path="frameworks/base" remote="b2g" revision="04e26ebdc36ca83f4ee3e9e2082b3fcf04c5b971"/>
   <project name="platform_frameworks_wilhelm" path="frameworks/wilhelm" remote="b2g" revision="0dbf5baafadf6d233c0a29e392fa3293f0121673"/>
   <project name="platform_system_core" path="system/core" remote="b2g" revision="f594bc64eacac490857748b1139ffcb34c856bbd"/>
+  <project name="platform_external_sepolicy" path="external/sepolicy" remote="b2g" revision="3f6be48a46c54dd8cacaf216ab5b145de5ffefd2"/>
   <default remote="caf" revision="refs/tags/android-5.1.0_r1" sync-j="4"/>
   <!-- Emulator specific things -->
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="fe7df1bc8dd0fd71571505d7be1c31a4ad1e40fb"/>
   <project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="48132ec0b0dfe9fc29c7c3f0e799066be8999198"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="59e434cbecc02653f44cedeb2ef5cc88dc8bb61b"/>
-  <project name="platform_external_sepolicy" path="external/sepolicy" remote="b2g" revision="3f6be48a46c54dd8cacaf216ab5b145de5ffefd2"/>
   <project name="platform_external_wpa_supplicant_8" path="external/wpa_supplicant_8" remote="b2g" revision="cbda29a58abc4ea1f7f4611fe354ab67b606219d"/>
   <project name="platform/development" path="development" revision="0c51f6e0aa2ee57fcb75ec3b2ff6bf754cece63e"/>
   <project name="android-sdk" path="sdk" remote="b2g" revision="ff4190dc603f62a7caa48342aa268acf99863c5c"/>
-  <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2210a0276fa000ef7224f26b24f00cb34a372e8d"/>
+  <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="10d289639ea62f2f6fcfb5bbf6121c484e95f767"/>
 </manifest>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="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="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2d58f4b9206b50b8fda0d5036da6f0c62608db7c"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="d70e4bfdcb65e7514de0f9315b74aea1c811678d"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
-        "git_revision": "581de383687dc441a878d2c91a0167c6ec688fef", 
+        "git_revision": "4ede0c6bf5fb0c2896d5393032b395999a154619", 
         "remote": "https://git.mozilla.org/releases/gaia.git", 
         "branch": ""
     }, 
-    "revision": "a0015e0f59bdec57f732c805238172bd49406ab5", 
+    "revision": "8c8613183a6efdbb9172b2c27ae1e60290398d45", 
     "repo_path": "integration/gaia-central"
 }
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -12,17 +12,17 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="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="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -10,17 +10,17 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
@@ -132,22 +132,22 @@
   <project name="platform/system/media" path="system/media" revision="70bfebc66d9c6a4c614a8c7efde90e8e7e1d8641"/>
   <project name="platform/system/netd" path="system/netd" revision="d113f0ceefa9ce29eb3c86e2d23c7417a70b4048"/>
   <project name="platform/system/security" path="system/security" revision="94e1617f6f2bc2286d005e79cffa6bf0721b06b3"/>
   <project name="platform/system/vold" path="system/vold" revision="c065e301e38ea0c241164e2a373e1ecefbeaf2ec"/>
   <project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="e372b6a77f71c8f9fbbf6f8adbfa7bf8ef45dc60"/>
   <project name="platform_frameworks_base" path="frameworks/base" remote="b2g" revision="04e26ebdc36ca83f4ee3e9e2082b3fcf04c5b971"/>
   <project name="platform_frameworks_wilhelm" path="frameworks/wilhelm" remote="b2g" revision="0dbf5baafadf6d233c0a29e392fa3293f0121673"/>
   <project name="platform_system_core" path="system/core" remote="b2g" revision="f594bc64eacac490857748b1139ffcb34c856bbd"/>
+  <project name="platform_external_sepolicy" path="external/sepolicy" remote="b2g" revision="3f6be48a46c54dd8cacaf216ab5b145de5ffefd2"/>
   <default remote="caf" revision="refs/tags/android-5.1.0_r1" sync-j="4"/>
   <!-- Nexus 5 specific things -->
   <project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="fe7df1bc8dd0fd71571505d7be1c31a4ad1e40fb"/>
   <project name="device-hammerhead" path="device/lge/hammerhead" remote="b2g" revision="e728bf3ff61dfab1b97c2416096a3b850b47cf25"/>
   <project name="device_lge_hammerhead-kernel" path="device/lge/hammerhead-kernel" remote="b2g" revision="8b3ffcfdd3d3852eca5488628f8bb2a08acbffa7"/>
-  <project name="platform_external_sepolicy" path="external/sepolicy" remote="b2g" revision="3f6be48a46c54dd8cacaf216ab5b145de5ffefd2"/>
   <project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="5d0ae53d9588c3d70c005aec9be94af9a534de16"/>
   <project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="c15b6e266136cd0cdd9b94d0bbed1962d9dd6672"/>
   <project name="platform/hardware/broadcom/libbt" path="hardware/broadcom/libbt" revision="399fe3d3c8f38c599a56becddc456133e62a5d70"/>
   <project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="3f3134d5cb19d5ace48d36d0100467a545d430eb"/>
   <project name="platform/hardware/qcom/audio" path="hardware/qcom/audio" revision="810c3dd29d009822a71eba9910e429a9ad114533"/>
   <project name="hardware_qcom_display" path="hardware/qcom/display" remote="b2g" revision="d8a56d7215bd26a61e43dcde20e64826a5fec265"/>
   <project name="platform/hardware/qcom/keymaster" path="hardware/qcom/keymaster" revision="eaede9f8bc206736a889bc57817047c31e205589"/>
   <project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="12364db20d6710f0003a4f00962c9790ad3c13e3"/>
--- a/dom/bluetooth/BluetoothCommon.h
+++ b/dom/bluetooth/BluetoothCommon.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothcommon_h
-#define mozilla_dom_bluetooth_bluetoothcommon_h
+#ifndef mozilla_dom_bluetooth_BluetoothCommon_h
+#define mozilla_dom_bluetooth_BluetoothCommon_h
 
 #include "mozilla/Compiler.h"
 #include "mozilla/Observer.h"
 #include "nsPrintfCString.h"
 #include "nsString.h"
 #include "nsTArray.h"
 
 extern bool gBluetoothDebugFlag;
@@ -805,9 +805,9 @@ enum BluetoothGapDataType {
   GAP_INCOMPLETE_UUID128 = 0X06, // Incomplete List of 128-bit Service Class UUIDs
   GAP_COMPLETE_UUID128   = 0X07, // Complete List of 128-bit Service Class UUIDs
   GAP_SHORTENED_NAME     = 0X08, // Shortened Local Name
   GAP_COMPLETE_NAME      = 0X09, // Complete Local Name
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_bluetoothcommon_h__
+#endif // mozilla_dom_bluetooth_BluetoothCommon_h
--- a/dom/bluetooth/BluetoothHidManager.h
+++ b/dom/bluetooth/BluetoothHidManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__
-#define mozilla_dom_bluetooth_bluetoothhidmanager_h__
+#ifndef mozilla_dom_bluetooth_BluetoothHidManager_h
+#define mozilla_dom_bluetooth_BluetoothHidManager_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothProfileController.h"
 #include "BluetoothProfileManagerBase.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothHidManager : public BluetoothProfileManagerBase
@@ -41,9 +41,9 @@ private:
   // data member
   bool mConnected;
   nsString mDeviceAddress;
   nsRefPtr<BluetoothProfileController> mController;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif //#ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__
+#endif // mozilla_dom_bluetooth_BluetoothHidManager_h
--- a/dom/bluetooth/BluetoothInterface.h
+++ b/dom/bluetooth/BluetoothInterface.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothinterface_h__
-#define mozilla_dom_bluetooth_bluetoothinterface_h__
+#ifndef mozilla_dom_bluetooth_BluetoothInterface_h
+#define mozilla_dom_bluetooth_BluetoothInterface_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 //
 // Socket Interface
@@ -1249,9 +1249,9 @@ public:
 
 protected:
   BluetoothInterface();
   virtual ~BluetoothInterface();
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothInterface_h
--- a/dom/bluetooth/BluetoothProfileManagerBase.h
+++ b/dom/bluetooth/BluetoothProfileManagerBase.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothprofilemanagerbase_h__
-#define mozilla_dom_bluetooth_bluetoothprofilemanagerbase_h__
+#ifndef mozilla_dom_bluetooth_BluetoothProfileManagerBase_h
+#define mozilla_dom_bluetooth_BluetoothProfileManagerBase_h
 
 /**
  * Error Messages used in Bluetooth profiles
  *
  * These error messages would be sent to Gaia as an argument of onError event.
  */
 #define ERR_ALREADY_CONNECTED           "AlreadyConnectedError"
 #define ERR_ALREADY_DISCONNECTED        "AlreadyDisconnectedError"
@@ -103,9 +103,9 @@ public:                                 
                        BluetoothProfileController* aController) override;    \
   virtual void Disconnect(BluetoothProfileController* aController) override; \
   virtual void OnConnect(const nsAString& aErrorStr) override;               \
   virtual void OnDisconnect(const nsAString& AErrorStr) override;            \
   virtual void Reset() override;
 
 END_BLUETOOTH_NAMESPACE
 
-#endif  //#ifndef mozilla_dom_bluetooth_bluetoothprofilemanagerbase_h__
+#endif  // mozilla_dom_bluetooth_BluetoothProfileManagerBase_h
--- a/dom/bluetooth/BluetoothRilListener.h
+++ b/dom/bluetooth/BluetoothRilListener.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothrillistener_h__
-#define mozilla_dom_bluetooth_bluetoothrillistener_h__
+#ifndef mozilla_dom_bluetooth_BluetoothRilListener_h
+#define mozilla_dom_bluetooth_BluetoothRilListener_h
 
 #include "BluetoothCommon.h"
 
 #include "nsAutoPtr.h"
 
 #include "nsIIccService.h"
 #include "nsIMobileConnectionService.h"
 #include "nsITelephonyCallInfo.h"
@@ -132,9 +132,9 @@ private:
   nsTArray<nsRefPtr<MobileConnectionListener> > mMobileConnListeners;
 
   nsRefPtr<IccListener> mIccListener;
   nsRefPtr<TelephonyListener> mTelephonyListener;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothRilListener_h
--- a/dom/bluetooth/BluetoothSocketObserver.h
+++ b/dom/bluetooth/BluetoothSocketObserver.h
@@ -47,9 +47,9 @@ public:                                 
   virtual void ReceiveSocketData(BluetoothSocket* aSocket,                  \
     nsAutoPtr<mozilla::ipc::UnixSocketBuffer>& aMessage) override;          \
   virtual void OnSocketConnectSuccess(BluetoothSocket* aSocket) override;   \
   virtual void OnSocketConnectError(BluetoothSocket* aSocket) override;     \
   virtual void OnSocketDisconnect(BluetoothSocket* aSocket) override;
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothSocketObserver_h
--- a/dom/bluetooth/BluetoothUtils.h
+++ b/dom/bluetooth/BluetoothUtils.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothutils_h
-#define mozilla_dom_bluetooth_bluetoothutils_h
+#ifndef mozilla_dom_bluetooth_BluetoothUtils_h
+#define mozilla_dom_bluetooth_BluetoothUtils_h
 
 #include "BluetoothCommon.h"
 #include "js/TypeDecls.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothNamedValue;
 class BluetoothReplyRunnable;
@@ -154,9 +154,9 @@ DispatchReplyError(BluetoothReplyRunnabl
 
 void
 DispatchStatusChangedEvent(const nsAString& aType,
                            const nsAString& aDeviceAddress,
                            bool aStatus);
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothUtils_h
--- a/dom/bluetooth/BluetoothUuid.h
+++ b/dom/bluetooth/BluetoothUuid.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothuuid_h__
-#define mozilla_dom_bluetooth_bluetoothuuid_h__
+#ifndef mozilla_dom_bluetooth_BluetoothUuid_h
+#define mozilla_dom_bluetooth_BluetoothUuid_h
 
 #include "BluetoothCommon.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothProfileManagerBase;
 
 /*
@@ -77,9 +77,9 @@ enum BluetoothReservedChannels {
   CHANNEL_SIM_ACCESS     = 15,
   CHANNEL_PBAP_PSE       = 19,
   CHANNEL_FTP            = 20,
   CHANNEL_OPUSH_L2CAP    = 5255
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothUuid_h
--- a/dom/bluetooth/ObexBase.h
+++ b/dom/bluetooth/ObexBase.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_obexbase_h__
-#define mozilla_dom_bluetooth_obexbase_h__
+#ifndef mozilla_dom_bluetooth_ObexBase_h
+#define mozilla_dom_bluetooth_ObexBase_h
 
 #include "BluetoothCommon.h"
 #include "nsAutoPtr.h"
 #include "nsTArray.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 const char FINAL_BIT = 0x80;
@@ -332,9 +332,9 @@ void SetObexPacketInfo(uint8_t* aRetBuf,
  * @return true when the message was parsed without any error, false otherwise.
  */
 bool ParseHeaders(const uint8_t* aHeaderStart,
                   int aTotalLength,
                   ObexHeaderSet* aRetHanderSet);
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_ObexBase_h
--- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.h
+++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetootha2dpmanager_h__
-#define mozilla_dom_bluetooth_bluetootha2dpmanager_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothA2dpManager_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothA2dpManager_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothInterface.h"
 #include "BluetoothProfileController.h"
 #include "BluetoothProfileManagerBase.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 class BluetoothA2dpManager : public BluetoothProfileManagerBase
--- a/dom/bluetooth/bluedroid/BluetoothDaemonA2dpInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonA2dpInterface.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothdaemona2dpinterface_h
-#define mozilla_dom_bluetooth_bluetoothdaemona2dpinterface_h
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonA2dpInterface_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonA2dpInterface_h
 
 #include "BluetoothDaemonHelpers.h"
 #include "BluetoothInterface.h"
 #include "mozilla/ipc/DaemonRunnables.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 using mozilla::ipc::DaemonSocketPDU;
@@ -157,9 +157,9 @@ private:
                      BluetoothStatus aStatus);
   void DispatchError(BluetoothA2dpResultHandler* aRes, nsresult aRv);
 
   BluetoothDaemonA2dpModule* mModule;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonA2dpInterface_h
--- a/dom/bluetooth/bluedroid/BluetoothDaemonAvrcpInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonAvrcpInterface.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothdaemonavrcpinterface_h
-#define mozilla_dom_bluetooth_bluetoothdaemonavrcpinterface_h
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonAvrcpInterface_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonAvrcpInterface_h
 
 #include "BluetoothDaemonHelpers.h"
 #include "BluetoothInterface.h"
 #include "mozilla/ipc/DaemonRunnables.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 using mozilla::ipc::DaemonSocketPDU;
@@ -356,9 +356,9 @@ private:
                      BluetoothStatus aStatus);
   void DispatchError(BluetoothAvrcpResultHandler* aRes, nsresult aRv);
 
   BluetoothDaemonAvrcpModule* mModule;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonAvrcpInterface_h
--- a/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothdaemongattinterface_h
-#define mozilla_dom_bluetooth_bluetoothdaemongattinterface_h
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonGattInterface_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonGattInterface_h
 
 #include "BluetoothDaemonHelpers.h"
 #include "BluetoothInterface.h"
 #include "mozilla/ipc/DaemonRunnables.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 using mozilla::ipc::DaemonSocketPDU;
@@ -1030,9 +1030,9 @@ private:
   void DispatchError(BluetoothGattServerResultHandler* aRes,
                      BluetoothStatus aStatus);
   void DispatchError(BluetoothGattServerResultHandler* aRes, nsresult aRv);
   BluetoothDaemonGattModule* mModule;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonGattInterface_h
--- a/dom/bluetooth/bluedroid/BluetoothDaemonHandsfreeInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonHandsfreeInterface.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothdaemonhandsfreeinterface_h
-#define mozilla_dom_bluetooth_bluetoothdaemonhandsfreeinterface_h
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHandsfreeInterface_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHandsfreeInterface_h
 
 #include "BluetoothDaemonHelpers.h"
 #include "BluetoothInterface.h"
 #include "mozilla/ipc/DaemonRunnables.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 using mozilla::ipc::DaemonSocketPDU;
@@ -466,9 +466,9 @@ private:
                      BluetoothStatus aStatus);
   void DispatchError(BluetoothHandsfreeResultHandler* aRes, nsresult aRv);
 
   BluetoothDaemonHandsfreeModule* mModule;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHandsfreeInterface_h
--- a/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonHelpers.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluedroid_bluetoothdaemonhelpers_h__
-#define mozilla_dom_bluetooth_bluedroid_bluetoothdaemonhelpers_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHelpers_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHelpers_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "mozilla/ipc/DaemonSocketPDU.h"
 #include "mozilla/ipc/DaemonSocketPDUHelpers.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
@@ -1186,9 +1186,9 @@ public:
     }
     WarnAboutTrailingData();
     return NS_OK;
   }
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHelpers_h
--- a/dom/bluetooth/bluedroid/BluetoothDaemonInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonInterface.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluedroid_bluetoothdaemoninterface_h__
-#define mozilla_dom_bluetooth_bluedroid_bluetoothdaemoninterface_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonInterface_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonInterface_h
 
 #include "BluetoothInterface.h"
 #include "mozilla/ipc/DaemonSocketConsumer.h"
 #include "mozilla/ipc/ListenSocketConsumer.h"
 
 namespace mozilla {
 namespace ipc {
 
@@ -162,9 +162,9 @@ private:
   nsAutoPtr<BluetoothDaemonHandsfreeInterface> mHandsfreeInterface;
   nsAutoPtr<BluetoothDaemonA2dpInterface> mA2dpInterface;
   nsAutoPtr<BluetoothDaemonAvrcpInterface> mAvrcpInterface;
   nsAutoPtr<BluetoothDaemonGattInterface> mGattInterface;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonInterface_h
--- a/dom/bluetooth/bluedroid/BluetoothDaemonSetupInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonSetupInterface.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluedroid_bluetoothdaemonsetupinterface_h__
-#define mozilla_dom_bluetooth_bluedroid_bluetoothdaemonsetupinterface_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSetupInterface_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSetupInterface_h
 
 #include "BluetoothCommon.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothSetupResultHandler
 {
 public:
@@ -22,9 +22,9 @@ public:
   virtual void Configuration();
 
 protected:
   virtual ~BluetoothSetupResultHandler();
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSetupInterface_h
--- a/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonSocketInterface.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluedroid_bluetoothdaemonsocketinterface_h__
-#define mozilla_dom_bluetooth_bluedroid_bluetoothdaemonsocketinterface_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSocketInterface_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSocketInterface_h
 
 #include "BluetoothDaemonHelpers.h"
 #include "BluetoothInterface.h"
 #include "mozilla/ipc/DaemonRunnables.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 using mozilla::ipc::DaemonSocketPDU;
@@ -117,9 +117,9 @@ private:
                      BluetoothStatus aStatus);
   void DispatchError(BluetoothSocketResultHandler* aRes, nsresult aRv);
 
   BluetoothDaemonSocketModule* mModule;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSocketInterface_h
--- a/dom/bluetooth/bluedroid/BluetoothGattManager.h
+++ b/dom/bluetooth/bluedroid/BluetoothGattManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothgattmanager_h__
-#define mozilla_dom_bluetooth_bluetoothgattmanager_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothGattManager_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothGattManager_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothInterface.h"
 #include "BluetoothProfileManagerBase.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothGattClient;
@@ -200,9 +200,9 @@ private:
   void ProceedDiscoverProcess(BluetoothGattClient* aClient,
                               const BluetoothGattServiceId& aServiceId);
 
   static bool mInShutdown;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothGattManager_h
--- a/dom/bluetooth/bluedroid/BluetoothOppManager.h
+++ b/dom/bluetooth/bluedroid/BluetoothOppManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothoppmanager_h__
-#define mozilla_dom_bluetooth_bluetoothoppmanager_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothOppManager_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothOppManager_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothProfileManagerBase.h"
 #include "BluetoothSocketObserver.h"
 #include "DeviceStorage.h"
 #include "mozilla/ipc/SocketBase.h"
 #include "nsCOMArray.h"
 
@@ -214,9 +214,9 @@ private:
   // Server sockets. Once an inbound connection is established, it will hand
   // over the ownership to mSocket, and get a new server socket while Listen()
   // is called.
   nsRefPtr<BluetoothSocket> mServerSocket;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothOppManager_h
--- a/dom/bluetooth/bluedroid/BluetoothPbapManager.h
+++ b/dom/bluetooth/bluedroid/BluetoothPbapManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothpbapmanager_h__
-#define mozilla_dom_bluetooth_bluetoothpbapmanager_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothPbapManager_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothPbapManager_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothProfileManagerBase.h"
 #include "BluetoothSocketObserver.h"
 #include "mozilla/ipc/SocketBase.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
@@ -94,9 +94,9 @@ private:
   // Server socket. Once an inbound connection is established, it will hand
   // over the ownership to mSocket, and get a new server socket while Listen()
   // is called.
   nsRefPtr<BluetoothSocket> mServerSocket;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothPbapManager_h
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
+++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothservicebluedroid_h__
-#define mozilla_dom_bluetooth_bluetoothservicebluedroid_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothServiceBluedroid_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothServiceBluedroid_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothInterface.h"
 #include "BluetoothService.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothServiceBluedroid : public BluetoothService
@@ -390,9 +390,9 @@ protected:
   uint16_t UuidToServiceClassInt(const BluetoothUuid& mUuid);
 
   static bool IsConnected(const nsAString& aRemoteBdAddr);
 #endif
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothServiceBluedroid_h
--- a/dom/bluetooth/bluedroid/BluetoothSocket.h
+++ b/dom/bluetooth/bluedroid/BluetoothSocket.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_BluetoothSocket_h
-#define mozilla_dom_bluetooth_BluetoothSocket_h
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothSocket_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothSocket_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/ipc/DataSocket.h"
 
 class MessageLoop;
 
 BEGIN_BLUETOOTH_NAMESPACE
 
@@ -93,9 +93,9 @@ private:
   BluetoothSocketObserver* mObserver;
   BluetoothSocketResultHandler* mCurrentRes;
   DroidSocketImpl* mImpl;
   nsString mDeviceAddress;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothSocket_h
--- a/dom/bluetooth/bluedroid/BluetoothSocketMessageWatcher.h
+++ b/dom/bluetooth/bluedroid/BluetoothSocketMessageWatcher.h
@@ -1,14 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothSocketMessageWatcher_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothSocketMessageWatcher_h
+
 #include "base/message_loop.h"
 #include "BluetoothCommon.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothSocketResultHandler;
 
 /* |SocketMessageWatcher| receives Bluedroid's socket setup
@@ -102,8 +105,10 @@ public:
 
   void Run() override;
 
 private:
   BluetoothSocketResultHandler* mRes;
 };
 
 END_BLUETOOTH_NAMESPACE
+
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothSocketMessageWatcher_h
--- a/dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.h
+++ b/dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothhfpmanager_h__
-#define mozilla_dom_bluetooth_bluetoothhfpmanager_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
 
 #include "BluetoothHfpManagerBase.h"
 
 /**
  * Fallback BluetoothHfpManager is built for non-phone devices (e.g., tablets).
  * These devices has no radio interface and the build flag MOZ_B2G_RIL is
  * disabled. To prevent build breaks of accessing radio interface, we implement
  * fallback BluetoothHfpManager with empty functions to keep original
@@ -43,9 +43,9 @@ protected:
 private:
   BluetoothHfpManager() { }
   bool Init();
   void HandleShutdown();
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
--- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
+++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothhfpmanager_h__
-#define mozilla_dom_bluetooth_bluetoothhfpmanager_h__
+#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
+#define mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
 
 #include "BluetoothInterface.h"
 #include "BluetoothCommon.h"
 #include "BluetoothHfpManagerBase.h"
 #include "BluetoothRilListener.h"
 #include "BluetoothSocketObserver.h"
 #include "mozilla/ipc/SocketBase.h"
 #include "mozilla/Hal.h"
@@ -223,9 +223,9 @@ private:
   nsRefPtr<BluetoothProfileController> mController;
 
   // CDMA-specific variable
   Call mCdmaSecondCall;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
--- a/dom/bluetooth/bluetooth2/BluetoothAdapter.h
+++ b/dom/bluetooth/bluetooth2/BluetoothAdapter.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothadapter_h__
-#define mozilla_dom_bluetooth_bluetoothadapter_h__
+#ifndef mozilla_dom_bluetooth_BluetoothAdapter_h
+#define mozilla_dom_bluetooth_BluetoothAdapter_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/dom/BluetoothAdapter2Binding.h"
 #include "mozilla/dom/BluetoothDeviceEvent.h"
 #include "mozilla/dom/Promise.h"
 #include "nsCOMPtr.h"
@@ -412,9 +412,9 @@ private:
    *      this new discovery starts.
    *   3) adapter unpaired with a device: The unpaired device will be removed.
    */
   nsTArray<nsRefPtr<BluetoothDevice> > mDevices;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothAdapter_h
--- a/dom/bluetooth/bluetooth2/BluetoothClassOfDevice.h
+++ b/dom/bluetooth/bluetooth2/BluetoothClassOfDevice.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothclassofdevice_h
-#define mozilla_dom_bluetooth_bluetoothclassofdevice_h
+#ifndef mozilla_dom_bluetooth_BluetoothClassOfDevice_h
+#define mozilla_dom_bluetooth_BluetoothClassOfDevice_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsPIDOMWindow.h"
 #include "nsWrapperCache.h"
 
@@ -85,9 +85,9 @@ private:
   uint8_t mMajorDeviceClass;
   uint8_t mMinorDeviceClass;
 
   nsCOMPtr<nsPIDOMWindow> mOwnerWindow;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_bluetoothclassofdevice_h
+#endif // mozilla_dom_bluetooth_BluetoothClassOfDevice_h
--- a/dom/bluetooth/bluetooth2/BluetoothDevice.h
+++ b/dom/bluetooth/bluetooth2/BluetoothDevice.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothdevice_h__
-#define mozilla_dom_bluetooth_bluetoothdevice_h__
+#ifndef mozilla_dom_bluetooth_BluetoothDevice_h
+#define mozilla_dom_bluetooth_BluetoothDevice_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/dom/BluetoothDevice2Binding.h"
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 #include "nsString.h"
 #include "nsCOMPtr.h"
 
@@ -239,9 +239,9 @@ public:
   {
     nsString deviceAddress;
     aDevice->GetAddress(deviceAddress);
 
     return deviceAddress.Equals(aAddress);
   }
 };
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothDevice_h
--- a/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
+++ b/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothdiscoveryhandle_h
-#define mozilla_dom_bluetooth_bluetoothdiscoveryhandle_h
+#ifndef mozilla_dom_bluetooth_BluetoothDiscoveryHandle_h
+#define mozilla_dom_bluetooth_BluetoothDiscoveryHandle_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/dom/bluetooth/BluetoothAdapter.h"
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "nsISupportsImpl.h"
 
@@ -71,9 +71,9 @@ private:
    * This array is only used by LE scan. If BluetoothDiscoveryHandle is built
    * for classic discovery, the array should be empty.
    */
   nsTArray<nsString> mServiceUuids;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_bluetoothdiscoveryhandle_h
+#endif // mozilla_dom_bluetooth_BluetoothDiscoveryHandle_h
--- a/dom/bluetooth/bluetooth2/BluetoothGatt.h
+++ b/dom/bluetooth/bluetooth2/BluetoothGatt.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothgatt_h__
-#define mozilla_dom_bluetooth_bluetoothgatt_h__
+#ifndef mozilla_dom_bluetooth_BluetoothGatt_h
+#define mozilla_dom_bluetooth_BluetoothGatt_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/dom/BluetoothGattBinding.h"
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 #include "mozilla/dom/bluetooth/BluetoothGattService.h"
 #include "nsCOMPtr.h"
 
@@ -186,9 +186,9 @@ private:
   /**
    * Indicate whether there is ongoing discoverServices request or not.
    */
   bool mDiscoveringServices;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothGatt_h
--- a/dom/bluetooth/bluetooth2/BluetoothGattCharacteristic.h
+++ b/dom/bluetooth/bluetooth2/BluetoothGattCharacteristic.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothgattcharacteristic_h__
-#define mozilla_dom_bluetooth_bluetoothgattcharacteristic_h__
+#ifndef mozilla_dom_bluetooth_BluetoothGattCharacteristic_h
+#define mozilla_dom_bluetooth_BluetoothGattCharacteristic_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/BluetoothGattCharacteristicBinding.h"
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 #include "mozilla/dom/bluetooth/BluetoothGattDescriptor.h"
 #include "mozilla/dom/TypedArray.h"
 #include "nsCOMPtr.h"
 #include "nsWrapperCache.h"
@@ -180,9 +180,9 @@ public:
   bool Equals(
     const nsRefPtr<mozilla::dom::bluetooth::BluetoothGattCharacteristic>& aChar,
     const mozilla::dom::bluetooth::BluetoothGattId& aCharId) const
   {
     return aChar->GetCharacteristicId() == aCharId;
   }
 };
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothGattCharacteristic_h
--- a/dom/bluetooth/bluetooth2/BluetoothGattDescriptor.h
+++ b/dom/bluetooth/bluetooth2/BluetoothGattDescriptor.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothgattdescriptor_h__
-#define mozilla_dom_bluetooth_bluetoothgattdescriptor_h__
+#ifndef mozilla_dom_bluetooth_BluetoothGattDescriptor_h
+#define mozilla_dom_bluetooth_BluetoothGattDescriptor_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/BluetoothGattDescriptorBinding.h"
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/TypedArray.h"
 #include "nsCOMPtr.h"
 #include "nsWrapperCache.h"
@@ -103,9 +103,9 @@ private:
   /**
    * Value of this GATT descriptor.
    */
   nsTArray<uint8_t> mValue;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothGattDescriptor_h
--- a/dom/bluetooth/bluetooth2/BluetoothGattServer.h
+++ b/dom/bluetooth/bluetooth2/BluetoothGattServer.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothgattserver_h__
-#define mozilla_dom_bluetooth_bluetoothgattserver_h__
+#ifndef mozilla_dom_bluetooth_BluetoothGattServer_h
+#define mozilla_dom_bluetooth_BluetoothGattServer_h
 
 #include "mozilla/dom/BluetoothGattServerBinding.h"
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 #include "nsCOMPtr.h"
 #include "nsPIDOMWindow.h"
 #include "nsWrapperCache.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
@@ -61,9 +61,9 @@ private:
    ***************************************************************************/
   nsCOMPtr<nsPIDOMWindow> mOwner;
 
   bool mValid;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothGattServer_h
--- a/dom/bluetooth/bluetooth2/BluetoothGattService.h
+++ b/dom/bluetooth/bluetooth2/BluetoothGattService.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothgattservice_h__
-#define mozilla_dom_bluetooth_bluetoothgattservice_h__
+#ifndef mozilla_dom_bluetooth_BluetoothGattService_h
+#define mozilla_dom_bluetooth_BluetoothGattService_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/BluetoothGattServiceBinding.h"
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 #include "mozilla/dom/bluetooth/BluetoothGattCharacteristic.h"
 #include "nsCOMPtr.h"
 #include "nsWrapperCache.h"
 #include "nsPIDOMWindow.h"
@@ -174,9 +174,9 @@ public:
   bool Equals(
     const nsRefPtr<mozilla::dom::bluetooth::BluetoothGattService>& aService,
     const mozilla::dom::bluetooth::BluetoothGattServiceId& aServiceId) const
   {
     return aService->GetServiceId() == aServiceId;
   }
 };
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothGattService_h
--- a/dom/bluetooth/bluetooth2/BluetoothLeDeviceEvent.h
+++ b/dom/bluetooth/bluetooth2/BluetoothLeDeviceEvent.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothledeviceevent_h
-#define mozilla_dom_bluetooth_bluetoothledeviceevent_h
+#ifndef mozilla_dom_bluetooth_BluetoothLeDeviceEvent_h
+#define mozilla_dom_bluetooth_BluetoothLeDeviceEvent_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/BluetoothLeDeviceEventBinding.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
@@ -56,9 +56,9 @@ public:
                      ErrorResult& aRv);
 
   private:
     nsTArray<uint8_t> mRawScanRecord;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_bluetoothledeviceevent_h
+#endif // mozilla_dom_bluetooth_BluetoothLeDeviceEvent_h
--- a/dom/bluetooth/bluetooth2/BluetoothManager.h
+++ b/dom/bluetooth/bluetooth2/BluetoothManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothmanager_h__
-#define mozilla_dom_bluetooth_bluetoothmanager_h__
+#ifndef mozilla_dom_bluetooth_BluetoothManager_h
+#define mozilla_dom_bluetooth_BluetoothManager_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/BluetoothAdapterEvent.h"
 #include "mozilla/dom/BluetoothAttributeEvent.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/Observer.h"
 #include "nsISupportsImpl.h"
@@ -135,9 +135,9 @@ private:
   /**
    * The adapters array.
    */
   nsTArray<nsRefPtr<BluetoothAdapter> > mAdapters;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothManager_h
--- a/dom/bluetooth/bluetooth2/BluetoothPairingHandle.h
+++ b/dom/bluetooth/bluetooth2/BluetoothPairingHandle.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothpairinghandle_h
-#define mozilla_dom_bluetooth_bluetoothpairinghandle_h
+#ifndef mozilla_dom_bluetooth_BluetoothPairingHandle_h
+#define mozilla_dom_bluetooth_BluetoothPairingHandle_h
 
 #include "BluetoothCommon.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 class ErrorResult;
 namespace dom {
 class Promise;
@@ -74,9 +74,9 @@ private:
   nsCOMPtr<nsPIDOMWindow> mOwner;
   nsString mDeviceAddress;
   nsString mType;
   nsString mPasskey;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_bluetoothpairinghandle_h
+#endif // mozilla_dom_bluetooth_BluetoothPairingHandle_h
--- a/dom/bluetooth/bluetooth2/BluetoothPairingListener.h
+++ b/dom/bluetooth/bluetooth2/BluetoothPairingListener.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothpairinglistener_h
-#define mozilla_dom_bluetooth_bluetoothpairinglistener_h
+#ifndef mozilla_dom_bluetooth_BluetoothPairingListener_h
+#define mozilla_dom_bluetooth_BluetoothPairingListener_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/DOMEventTargetHelper.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothSignal;
@@ -63,9 +63,9 @@ private:
    * Indicate whether or not this pairing listener has started listening to
    * Bluetooth signal.
    */
   bool mHasListenedToSignal;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_bluetoothpairinglistener_h
+#endif // mozilla_dom_bluetooth_BluetoothPairingListener_h
--- a/dom/bluetooth/bluetooth2/BluetoothProfileController.h
+++ b/dom/bluetooth/bluetooth2/BluetoothProfileController.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothprofilecontroller_h__
-#define mozilla_dom_bluetooth_bluetoothprofilecontroller_h__
+#ifndef mozilla_dom_bluetooth_BluetoothProfileController_h
+#define mozilla_dom_bluetooth_BluetoothProfileController_h
 
 #include "BluetoothUuid.h"
 #include "nsISupportsImpl.h"
 #include "nsAutoPtr.h"
 #include "nsITimer.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
@@ -152,9 +152,9 @@ private:
     BluetoothServiceClass service;
   } mTarget;
 
   nsCOMPtr<nsITimer> mTimer;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothProfileController_h
--- a/dom/bluetooth/bluetooth2/BluetoothReplyRunnable.h
+++ b/dom/bluetooth/bluetooth2/BluetoothReplyRunnable.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothreplyrunnable_h__
-#define mozilla_dom_bluetooth_bluetoothreplyrunnable_h__
+#ifndef mozilla_dom_bluetooth_BluetoothReplyRunnable_h
+#define mozilla_dom_bluetooth_BluetoothReplyRunnable_h
 
 #include "mozilla/Attributes.h"
 #include "BluetoothCommon.h"
 #include "nsThreadUtils.h"
 #include "js/Value.h"
 
 class nsIDOMDOMRequest;
 
@@ -85,9 +85,9 @@ protected:
   {
     aValue.setUndefined();
     return true;
   }
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothReplyRunnable_h
--- a/dom/bluetooth/bluetooth2/BluetoothService.h
+++ b/dom/bluetooth/bluetooth2/BluetoothService.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetootheventservice_h__
-#define mozilla_dom_bluetooth_bluetootheventservice_h__
+#ifndef mozilla_dom_bluetooth_BluetoothService_h
+#define mozilla_dom_bluetooth_BluetoothService_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothInterface.h"
 #include "BluetoothProfileManagerBase.h"
 #include "nsAutoPtr.h"
 #include "nsClassHashtable.h"
 #include "nsIObserver.h"
 #include "nsTObserverArray.h"
@@ -559,9 +559,9 @@ protected:
 
   nsTArray<BluetoothSignal> mPendingPairReqSignals;
 
   bool mEnabled;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_BluetoothService_h
--- a/dom/bluetooth/bluetooth2/ipc/BluetoothChild.h
+++ b/dom/bluetooth/bluetooth2/ipc/BluetoothChild.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_ipc_bluetoothchild_h__
-#define mozilla_dom_bluetooth_ipc_bluetoothchild_h__
+#ifndef mozilla_dom_bluetooth_ipc_BluetoothChild_h
+#define mozilla_dom_bluetooth_ipc_BluetoothChild_h
 
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
 #include "mozilla/dom/bluetooth/PBluetoothChild.h"
 #include "mozilla/dom/bluetooth/PBluetoothRequestChild.h"
 
 #include "mozilla/Attributes.h"
@@ -97,9 +97,9 @@ protected:
   ActorDestroy(ActorDestroyReason aWhy) override;
 
   virtual bool
   Recv__delete__(const BluetoothReply& aReply) override;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_ipc_bluetoothchild_h__
+#endif // mozilla_dom_bluetooth_ipc_BluetoothChild_h
--- a/dom/bluetooth/bluetooth2/ipc/BluetoothMessageUtils.h
+++ b/dom/bluetooth/bluetooth2/ipc/BluetoothMessageUtils.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__
-#define mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__
+#ifndef mozilla_dom_bluetooth_ipc_BluetoothMessageUtils_h
+#define mozilla_dom_bluetooth_ipc_BluetoothMessageUtils_h
 
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 #include "ipc/IPCMessageUtils.h"
 
 namespace IPC {
 
 template <>
 struct ParamTraits<mozilla::dom::bluetooth::BluetoothObjectType>
@@ -133,9 +133,9 @@ struct ParamTraits<mozilla::dom::bluetoo
     }
 
     return true;
   }
 };
 
 } // namespace IPC
 
-#endif // mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__
+#endif // mozilla_dom_bluetooth_ipc_BluetoothMessageUtils_h
--- a/dom/bluetooth/bluetooth2/ipc/BluetoothParent.h
+++ b/dom/bluetooth/bluetooth2/ipc/BluetoothParent.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_ipc_bluetoothparent_h__
-#define mozilla_dom_bluetooth_ipc_bluetoothparent_h__
+#ifndef mozilla_dom_bluetooth_ipc_BluetoothParent_h
+#define mozilla_dom_bluetooth_ipc_BluetoothParent_h
 
 #include "mozilla/dom/bluetooth/BluetoothCommon.h"
 
 #include "mozilla/dom/bluetooth/PBluetoothParent.h"
 #include "mozilla/dom/bluetooth/PBluetoothRequestParent.h"
 
 #include "mozilla/Attributes.h"
 #include "mozilla/Observer.h"
@@ -260,9 +260,9 @@ protected:
   DoRequest(const GattClientReadDescriptorValueRequest& aRequest);
 
   bool
   DoRequest(const GattClientWriteDescriptorValueRequest& aRequest);
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_ipc_bluetoothparent_h__
+#endif // mozilla_dom_bluetooth_ipc_BluetoothParent_h
--- a/dom/bluetooth/bluetooth2/ipc/BluetoothServiceChildProcess.h
+++ b/dom/bluetooth/bluetooth2/ipc/BluetoothServiceChildProcess.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_ipc_bluetoothservicechildprocess_h__
-#define mozilla_dom_bluetooth_ipc_bluetoothservicechildprocess_h__
+#ifndef mozilla_dom_bluetooth_ipc_BluetoothServiceChildProcess_h
+#define mozilla_dom_bluetooth_ipc_BluetoothServiceChildProcess_h
 
 #include "BluetoothService.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothChild;
 
 class BluetoothServiceChildProcess : public BluetoothService
@@ -290,9 +290,9 @@ private:
   bool
   IsSignalRegistered(const nsAString& aNodeName) {
     return !!mBluetoothSignalObserverTable.Get(aNodeName);
   }
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif // mozilla_dom_bluetooth_ipc_bluetoothservicechildprocess_h__
+#endif // mozilla_dom_bluetooth_ipc_BluetoothServiceChildProcess_h
--- a/dom/bluetooth/bluez/BluetoothA2dpManager.h
+++ b/dom/bluetooth/bluez/BluetoothA2dpManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetootha2dpmanager_h__
-#define mozilla_dom_bluetooth_bluetootha2dpmanager_h__
+#ifndef mozilla_dom_bluetooth_bluez_BluetoothA2dpManager_h
+#define mozilla_dom_bluetooth_bluez_BluetoothA2dpManager_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothProfileController.h"
 #include "BluetoothProfileManagerBase.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothA2dpManager : public BluetoothProfileManagerBase
@@ -82,9 +82,9 @@ private:
   uint64_t mMediaNumber;
   uint64_t mTotalMediaCount;
   uint32_t mPosition;
   ControlPlayStatus mPlayStatus;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluez_BluetoothA2dpManager_h
--- a/dom/bluetooth/bluez/BluetoothDBusService.h
+++ b/dom/bluetooth/bluez/BluetoothDBusService.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothdbusservice_h__
-#define mozilla_dom_bluetooth_bluetoothdbusservice_h__
+#ifndef mozilla_dom_bluetooth_bluez_BluetoothDBusService_h
+#define mozilla_dom_bluetooth_bluez_BluetoothDBusService_h
 
 #include "mozilla/Attributes.h"
 #include "BluetoothCommon.h"
 #include "mozilla/ipc/RawDBusConnection.h"
 #include "BluetoothService.h"
 #include "nsIThread.h"
 
 class DBusMessage;
@@ -333,9 +333,9 @@ private:
   nsresult SendAsyncDBusMessage(const nsAString& aObjectPath,
                                 const char* aInterface,
                                 const nsAString& aMessage,
                                 mozilla::ipc::DBusReplyCallback aCallback);
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluez_BluetoothDBusService_h
--- a/dom/bluetooth/bluez/BluetoothHfpManager.h
+++ b/dom/bluetooth/bluez/BluetoothHfpManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothhfpmanager_h__
-#define mozilla_dom_bluetooth_bluetoothhfpmanager_h__
+#ifndef mozilla_dom_bluetooth_bluez_BluetoothHfpManager_h
+#define mozilla_dom_bluetooth_bluez_BluetoothHfpManager_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothHfpManagerBase.h"
 #ifdef MOZ_B2G_RIL
 #include "BluetoothRilListener.h"
 #endif
 #include "BluetoothSocketObserver.h"
 #include "mozilla/ipc/SocketBase.h"
@@ -225,9 +225,9 @@ private:
 #ifdef MOZ_B2G_RIL
   // CDMA-specific variable
   Call mCdmaSecondCall;
 #endif
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluez_BluetoothHfpManager_h
--- a/dom/bluetooth/bluez/BluetoothOppManager.h
+++ b/dom/bluetooth/bluez/BluetoothOppManager.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_bluetoothoppmanager_h__
-#define mozilla_dom_bluetooth_bluetoothoppmanager_h__
+#ifndef mozilla_dom_bluetooth_bluez_BluetoothOppManager_h
+#define mozilla_dom_bluetooth_bluez_BluetoothOppManager_h
 
 #include "BluetoothCommon.h"
 #include "BluetoothProfileManagerBase.h"
 #include "BluetoothSocketObserver.h"
 #include "DeviceStorage.h"
 #include "mozilla/ipc/SocketBase.h"
 #include "nsCOMArray.h"
 
@@ -223,9 +223,9 @@ private:
 
   // This holds the time when OPP manager fail to get service channel and
   // prepare to refresh SDP records.
   mozilla::TimeStamp mLastServiceChannelCheck;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluez_BluetoothOppManager_h
--- a/dom/bluetooth/bluez/BluetoothSocket.h
+++ b/dom/bluetooth/bluez/BluetoothSocket.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_BluetoothSocket_h
-#define mozilla_dom_bluetooth_BluetoothSocket_h
+#ifndef mozilla_dom_bluetooth_bluez_BluetoothSocket_h
+#define mozilla_dom_bluetooth_bluez_BluetoothSocket_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/ipc/DataSocket.h"
 #include "mozilla/ipc/UnixSocketWatcher.h"
 #include "nsAutoPtr.h"
 #include "nsString.h"
 
 class MessageLoop;
@@ -130,9 +130,9 @@ private:
   class ListenTask;
 
   BluetoothSocketObserver* mObserver;
   BluetoothSocketIO* mIO;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluez_BluetoothSocket_h
--- a/dom/bluetooth/bluez/BluetoothUnixSocketConnector.h
+++ b/dom/bluetooth/bluez/BluetoothUnixSocketConnector.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_bluetooth_BluetoothUnixSocketConnector_h
-#define mozilla_dom_bluetooth_BluetoothUnixSocketConnector_h
+#ifndef mozilla_dom_bluetooth_bluez_BluetoothUnixSocketConnector_h
+#define mozilla_dom_bluetooth_bluez_BluetoothUnixSocketConnector_h
 
 #include <bluetooth/bluetooth.h>
 #include "BluetoothCommon.h"
 #include "mozilla/ipc/UnixSocketConnector.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothUnixSocketConnector final
@@ -56,9 +56,9 @@ private:
   BluetoothSocketType mType;
   int mChannel;
   bool mAuth;
   bool mEncrypt;
 };
 
 END_BLUETOOTH_NAMESPACE
 
-#endif
+#endif // mozilla_dom_bluetooth_bluez_BluetoothUnixSocketConnector_h
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -6718,17 +6718,17 @@ struct FactoryOp::MaybeBlockedDatabaseIn
 class OpenDatabaseOp final
   : public FactoryOp
 {
   friend class Database;
   friend class VersionChangeTransaction;
 
   class VersionChangeOp;
 
-  const OptionalContentId mOptionalContentParentId;
+  OptionalContentId mOptionalContentParentId;
 
   nsRefPtr<FullDatabaseMetadata> mMetadata;
 
   uint64_t mRequestedVersion;
   nsString mDatabaseFilePath;
   nsRefPtr<FileManager> mFileManager;
 
   nsRefPtr<Database> mDatabase;
@@ -7234,17 +7234,17 @@ class ObjectStoreAddOrPutRequestOp final
 
   nsRefPtr<FileManager> mFileManager;
 
   Key mResponse;
   const nsCString mGroup;
   const nsCString mOrigin;
   const PersistenceType mPersistenceType;
   const bool mOverwrite;
-  const bool mObjectStoreMayHaveIndexes;
+  bool mObjectStoreMayHaveIndexes;
 
 private:
   // Only created by TransactionBase.
   ObjectStoreAddOrPutRequestOp(TransactionBase* aTransaction,
                                const RequestParams& aParams);
 
   ~ObjectStoreAddOrPutRequestOp()
   { }
@@ -7352,17 +7352,17 @@ private:
 
 class ObjectStoreDeleteRequestOp final
   : public NormalTransactionOp
 {
   friend class TransactionBase;
 
   const ObjectStoreDeleteParams mParams;
   ObjectStoreDeleteResponse mResponse;
-  const bool mObjectStoreMayHaveIndexes;
+  bool mObjectStoreMayHaveIndexes;
 
 private:
   ObjectStoreDeleteRequestOp(TransactionBase* aTransaction,
                              const ObjectStoreDeleteParams& aParams);
 
   ~ObjectStoreDeleteRequestOp()
   { }
 
@@ -7378,17 +7378,17 @@ private:
 
 class ObjectStoreClearRequestOp final
   : public NormalTransactionOp
 {
   friend class TransactionBase;
 
   const ObjectStoreClearParams mParams;
   ObjectStoreClearResponse mResponse;
-  const bool mObjectStoreMayHaveIndexes;
+  bool mObjectStoreMayHaveIndexes;
 
 private:
   ObjectStoreClearRequestOp(TransactionBase* aTransaction,
                             const ObjectStoreClearParams& aParams);
 
   ~ObjectStoreClearRequestOp()
   { }
 
@@ -18785,25 +18785,22 @@ OpenDatabaseOp::OpenDatabaseOp(Factory* 
                                already_AddRefed<ContentParent> aContentParent,
                                const CommonFactoryRequestParams& aParams)
   : FactoryOp(aFactory, Move(aContentParent), aParams, /* aDeleting */ false)
   , mMetadata(new FullDatabaseMetadata(aParams.metadata()))
   , mRequestedVersion(aParams.metadata().version())
   , mVersionChangeOp(nullptr)
   , mTelemetryId(0)
 {
-  auto& optionalContentParentId =
-    const_cast<OptionalContentId&>(mOptionalContentParentId);
-
   if (mContentParent) {
     // This is a little scary but it looks safe to call this off the main thread
     // for now.
-    optionalContentParentId = mContentParent->ChildID();
-  } else {
-    optionalContentParentId = void_t();
+    mOptionalContentParentId = mContentParent->ChildID();
+  } else {
+    mOptionalContentParentId = void_t();
   }
 }
 
 void
 OpenDatabaseOp::ActorDestroy(ActorDestroyReason aWhy)
 {
   AssertIsOnOwningThread();
 
@@ -22629,17 +22626,17 @@ ObjectStoreAddOrPutRequestOp::ObjectStor
 {
   MOZ_ASSERT(aParams.type() == RequestParams::TObjectStoreAddParams ||
              aParams.type() == RequestParams::TObjectStorePutParams);
 
   mMetadata =
     aTransaction->GetMetadataForObjectStoreId(mParams.objectStoreId());
   MOZ_ASSERT(mMetadata);
 
-  const_cast<bool&>(mObjectStoreMayHaveIndexes) = mMetadata->HasLiveIndexes();
+  mObjectStoreMayHaveIndexes = mMetadata->HasLiveIndexes();
 }
 
 nsresult
 ObjectStoreAddOrPutRequestOp::RemoveOldIndexDataValues(
                                                 DatabaseConnection* aConnection)
 {
   AssertIsOnConnectionThread();
   MOZ_ASSERT(aConnection);
@@ -23560,17 +23557,17 @@ ObjectStoreDeleteRequestOp::ObjectStoreD
 {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aTransaction);
 
   nsRefPtr<FullObjectStoreMetadata> metadata =
     aTransaction->GetMetadataForObjectStoreId(mParams.objectStoreId());
   MOZ_ASSERT(metadata);
 
-  const_cast<bool&>(mObjectStoreMayHaveIndexes) = metadata->HasLiveIndexes();
+  mObjectStoreMayHaveIndexes = metadata->HasLiveIndexes();
 }
 
 nsresult
 ObjectStoreDeleteRequestOp::DoDatabaseWork(DatabaseConnection* aConnection)
 {
   MOZ_ASSERT(aConnection);
   aConnection->AssertIsOnConnectionThread();
   PROFILER_LABEL("IndexedDB",
@@ -23652,17 +23649,17 @@ ObjectStoreClearRequestOp::ObjectStoreCl
 {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aTransaction);
 
   nsRefPtr<FullObjectStoreMetadata> metadata =
     aTransaction->GetMetadataForObjectStoreId(mParams.objectStoreId());
   MOZ_ASSERT(metadata);
 
-  const_cast<bool&>(mObjectStoreMayHaveIndexes) = metadata->HasLiveIndexes();
+  mObjectStoreMayHaveIndexes = metadata->HasLiveIndexes();
 }
 
 nsresult
 ObjectStoreClearRequestOp::DoDatabaseWork(DatabaseConnection* aConnection)
 {
   MOZ_ASSERT(aConnection);
   aConnection->AssertIsOnConnectionThread();
 
--- a/dom/mobileconnection/gonk/MobileConnectionService.js
+++ b/dom/mobileconnection/gonk/MobileConnectionService.js
@@ -55,16 +55,24 @@ XPCOMUtils.defineLazyServiceGetter(this,
 XPCOMUtils.defineLazyServiceGetter(this, "gNetworkManager",
                                    "@mozilla.org/network/manager;1",
                                    "nsINetworkManager");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gIccService",
                                    "@mozilla.org/icc/iccservice;1",
                                    "nsIIccService");
 
+XPCOMUtils.defineLazyServiceGetter(this, "gDataCallManager",
+                                   "@mozilla.org/datacall/manager;1",
+                                   "nsIDataCallManager");
+
+XPCOMUtils.defineLazyModuleGetter(this, "gTelephonyUtils",
+                                  "resource://gre/modules/TelephonyUtils.jsm",
+                                  "TelephonyUtils");
+
 XPCOMUtils.defineLazyGetter(this, "gRadioInterfaceLayer", function() {
   let ril = { numRadioInterfaces: 0 };
   try {
     ril = Cc["@mozilla.org/ril;1"].getService(Ci.nsIRadioInterfaceLayer);
   } catch(e) {}
   return ril;
 });
 
@@ -715,16 +723,115 @@ MobileConnectionProvider.prototype = {
         active.serviceId === this._clientId) {
       aNewInfo.connected = true;
     }
 
     let isUpdated = this._updateConnectionInfo(this.data, aNewInfo);
     if (isUpdated && !aBatch) {
       this.deliverListenerEvent("notifyDataChanged");
     }
+
+    if (isUpdated) {
+      this._ensureDataRegistration();
+    }
+  },
+
+  _dataRegistrationFailed: false,
+  _ensureDataRegistration: function() {
+    let isDataRegistered =
+      this.data &&
+      this.data.state == RIL.GECKO_MOBILE_CONNECTION_STATE_REGISTERED;
+    let isVoiceRegistered =
+      this.voice &&
+      this.voice.state == RIL.GECKO_MOBILE_CONNECTION_STATE_REGISTERED;
+
+    if (isVoiceRegistered && isDataRegistered) {
+      if (DEBUG) {
+        this._debug("Voice and data registered.");
+      }
+      this._dataRegistrationFailed = false;
+      return;
+    }
+
+    if (isVoiceRegistered && !isDataRegistered &&
+        this._clientId == gDataCallManager.dataDefaultServiceId) {
+
+      // We have been here before, no more recovery.
+      if (this._dataRegistrationFailed) {
+        if (DEBUG) {
+          this._debug("Voice and data not consistent: " + this.voice.state +
+                      " != " + this.data.state + ".");
+        }
+        return;
+      }
+
+      if (DEBUG) {
+        this._debug("Voice and data not consistent: " + this.voice.state +
+                    " != " + this.data.state + ", try to recover.");
+      }
+
+      this._dataRegistrationFailed = true;
+      // If there is any ongoing call, wait for them to disconnect.
+      if (gTelephonyUtils.hasAnyCalls(this._clientId)) {
+        gTelephonyUtils.waitForNoCalls(this._clientId)
+          .then(() => {
+            if (this._dataRegistrationFailed) {
+              this._recoverDataRegistration();
+            }
+          });
+        return;
+      }
+
+      this._recoverDataRegistration();
+    }
+  },
+
+
+  /**
+   * To recover data registration, get the current preferred network type first,
+   * then set it to a temporary preferred network type, and last set back to the
+   * previous preferred network type. This is will cause deregistration and
+   * registration on both voice and data networks.
+   */
+  _recoverDataRegistration: function() {
+    if (DEBUG) {
+      this._debug("Trying to recover data registration...");
+    }
+
+    let currentPreferredNetworkType;
+
+    let resetPreferredNetworkType = () => {
+      this.setPreferredNetworkType(currentPreferredNetworkType, {
+        QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionCallback]),
+        notifySuccess: () => {},
+        notifyError: aErrorMsg => {}
+      });
+    };
+
+    let setTemporaryPreferredNetworkType = () => {
+      this.setPreferredNetworkType(
+        Ci.nsIMobileConnection.PREFERRED_NETWORK_TYPE_WCDMA_GSM_CDMA_EVDO, {
+          QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionCallback]),
+          notifySuccess: () =>  resetPreferredNetworkType(),
+          notifyError: aErrorMsg => resetPreferredNetworkType()
+      });
+    };
+
+    this.getPreferredNetworkType({
+      QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionCallback]),
+      notifyGetPreferredNetworkTypeSuccess: networkType => {
+        currentPreferredNetworkType = networkType;
+        setTemporaryPreferredNetworkType();
+      },
+      notifyError: aErrorMsg => {
+        currentPreferredNetworkType =
+          Ci.nsIMobileConnection.PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO;
+        setTemporaryPreferredNetworkType();
+      }
+    });
   },
 
   updateOperatorInfo: function(aNewInfo, aBatch = false) {
     let isUpdated = this._updateInfo(this._operatorInfo, aNewInfo);
 
     // Update lastKnownNetwork
     if (this._operatorInfo.mcc && this._operatorInfo.mnc) {
       let network = this._operatorInfo.mcc + "-" + this._operatorInfo.mnc;
--- a/dom/system/gonk/DataCallManager.js
+++ b/dom/system/gonk/DataCallManager.js
@@ -144,16 +144,20 @@ DataCallManager.prototype = {
   // Pending function to execute when we are notified that another data call has
   // been disconnected.
   _pendingDataCallRequest: null,
 
   debug: function(aMsg) {
     dump("-*- DataCallManager: " + aMsg + "\n");
   },
 
+  get dataDefaultServiceId() {
+    return this._dataDefaultClientId;
+  },
+
   getDataCallHandler: function(aClientId) {
     let handler = this._connectionHandlers[aClientId]
     if (!handler) {
       throw Cr.NS_ERROR_UNEXPECTED;
     }
 
     return handler;
   },
--- a/dom/system/gonk/GonkGPSGeolocationProvider.cpp
+++ b/dom/system/gonk/GonkGPSGeolocationProvider.cpp
@@ -129,28 +129,101 @@ GonkGPSGeolocationProvider::LocationCall
                                                         location->speed,
                                                         PR_Now() / PR_USEC_PER_MSEC);
   // Note above: Can't use location->timestamp as the time from the satellite is a
   // minimum of 16 secs old (see http://leapsecond.com/java/gpsclock.htm).
   // All code from this point on expects the gps location to be timestamped with the
   // current time, most notably: the geolocation service which respects maximumAge
   // set in the DOM JS.
 
+  if (gDebug_isLoggingEnabled) {
+    nsContentUtils::LogMessageToConsole("geo: GPS got a fix (%f, %f). accuracy: %f",
+                                        location->latitude,
+                                        location->longitude,
+                                        location->accuracy);
+  }
 
   NS_DispatchToMainThread(new UpdateLocationEvent(somewhere));
 }
 
 void
 GonkGPSGeolocationProvider::StatusCallback(GpsStatus* status)
 {
+  if (gDebug_isLoggingEnabled) {
+    switch (status->status) {
+      case GPS_STATUS_NONE:
+        nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_NONE\n");
+        break;
+      case GPS_STATUS_SESSION_BEGIN:
+        nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_SESSION_BEGIN\n");
+        break;
+      case GPS_STATUS_SESSION_END:
+        nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_SESSION_END\n");
+        break;
+      case GPS_STATUS_ENGINE_ON:
+        nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_ENGINE_ON\n");
+        break;
+      case GPS_STATUS_ENGINE_OFF:
+        nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_ENGINE_OFF\n");
+        break;
+      default:
+        nsContentUtils::LogMessageToConsole("geo: Unknown GPS status\n");
+        break;
+    }
+  }
 }
 
 void
 GonkGPSGeolocationProvider::SvStatusCallback(GpsSvStatus* sv_info)
 {
+  if (gDebug_isLoggingEnabled) {
+    static int numSvs = 0;
+    static uint32_t numEphemeris = 0;
+    static uint32_t numAlmanac = 0;
+    static uint32_t numUsedInFix = 0;
+
+    unsigned int i = 1;
+    uint32_t svAlmanacCount = 0;
+    for (i = 1; i > 0; i <<= 1) {
+      if (i & sv_info->almanac_mask) {
+        svAlmanacCount++;
+      }
+    }
+
+    uint32_t svEphemerisCount = 0;
+    for (i = 1; i > 0; i <<= 1) {
+      if (i & sv_info->ephemeris_mask) {
+        svEphemerisCount++;
+      }
+    }
+
+    uint32_t svUsedCount = 0;
+    for (i = 1; i > 0; i <<= 1) {
+      if (i & sv_info->used_in_fix_mask) {
+        svUsedCount++;
+      }
+    }
+
+    // Log the message only if the the status changed.
+    if (sv_info->num_svs != numSvs ||
+        svAlmanacCount != numAlmanac ||
+        svEphemerisCount != numEphemeris ||
+        svUsedCount != numUsedInFix) {
+
+      nsContentUtils::LogMessageToConsole(
+        "geo: Number of SVs have (visibility, almanac, ephemeris): (%d, %d, %d)."
+        "  %d of these SVs were used in fix.\n",
+        sv_info->num_svs, svAlmanacCount, svEphemerisCount, svUsedCount);
+
+      numSvs = sv_info->num_svs;
+      numAlmanac = svAlmanacCount;
+      numEphemeris = svEphemerisCount;
+      numUsedInFix = svUsedCount;
+    }
+  }
 }
 
 void
 GonkGPSGeolocationProvider::NmeaCallback(GpsUtcTime timestamp, const char* nmea, int length)
 {
   if (gDebug_isLoggingEnabled) {
     nsContentUtils::LogMessageToConsole("geo: NMEA: timestamp:\t%lld, length: %d, %s",
                                         timestamp, length, nmea);
--- a/dom/system/gonk/nsIDataCallManager.idl
+++ b/dom/system/gonk/nsIDataCallManager.idl
@@ -50,19 +50,21 @@ interface nsIDataCallHandler : nsISuppor
   void deactivateDataCalls(in nsIDeactivateDataCallsCallback callback);
 
   /**
    * Called to reconsider data call state.
    */
   void updateRILNetworkInterface();
 };
 
-[scriptable, uuid(aac54873-5771-4093-a72b-fe39967c6607)]
+[scriptable, uuid(2c46e37d-88dc-4d25-bb37-e1c0d3e9cb5f)]
 interface nsIDataCallManager : nsISupports
 {
+  readonly attribute long dataDefaultServiceId;
+
   /**
    * Get the corresponding data call handler.
    *
    * @param clientId
    *        clientId of the data call handler to get.
    */
   nsIDataCallHandler getDataCallHandler(in unsigned long clientId);
 };
\ No newline at end of file
--- a/netwerk/dns/mdns/libmdns/MDNSResponderOperator.cpp
+++ b/netwerk/dns/mdns/libmdns/MDNSResponderOperator.cpp
@@ -60,52 +60,61 @@ public:
     }
 
     DNSServiceProcessResult(mService);
   }
 
   virtual void OnSocketDetached(PRFileDesc *fd) override
   {
     MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
+    MOZ_ASSERT(mThread);
     MOZ_ASSERT(fd == mFD);
 
     if (!mFD) {
       return;
     }
 
+    // Bug 1175387: do not double close the handle here.
+    PR_ChangeFileDescNativeHandle(mFD, -1);
     PR_Close(mFD);
     mFD = nullptr;
+
+    nsCOMPtr<nsIRunnable> ev =
+      NS_NewRunnableMethod(this, &ServiceWatcher::Deallocate);
+    mThread->Dispatch(ev, NS_DISPATCH_NORMAL);
   }
 
   virtual void IsLocal(bool *aIsLocal) override { *aIsLocal = true; }
 
   virtual void KeepWhenOffline(bool *aKeepWhenOffline) override
   {
     *aKeepWhenOffline = true;
   }
 
   virtual uint64_t ByteCountSent() override { return 0; }
   virtual uint64_t ByteCountReceived() override { return 0; }
 
   explicit ServiceWatcher(DNSServiceRef aService)
-    : mSts(nullptr)
+    : mThread(nullptr)
+    , mSts(nullptr)
     , mService(aService)
     , mFD(nullptr)
     , mAttached(false)
   {
     if (!gSocketTransportService)
     {
       nsCOMPtr<nsISocketTransportService> sts =
         do_GetService(NS_SOCKETTRANSPORTSERVICE_CONTRACTID);
     }
   }
 
   nsresult Init()
   {
     MOZ_ASSERT(PR_GetCurrentThread() != gSocketThread);
+    mThread = NS_GetCurrentThread();
 
     if (!mService) {
       return NS_OK;
     }
 
     if (!gSocketTransportService) {
       return NS_ERROR_FAILURE;
     }
@@ -119,31 +128,35 @@ public:
     mFD = PR_ImportFile(osfd);
     return PostEvent(&ServiceWatcher::OnMsgAttach);
   }
 
   void Close()
   {
     MOZ_ASSERT(PR_GetCurrentThread() != gSocketThread);
 
-    if (mService) {
-      DNSServiceRefDeallocate(mService);
-      mService = nullptr;
-    }
-
     if (!gSocketTransportService) {
+      Deallocate();
       return;
     }
 
     PostEvent(&ServiceWatcher::OnMsgClose);
   }
 
 private:
   ~ServiceWatcher() = default;
 
+  void Deallocate()
+  {
+    if (mService) {
+      DNSServiceRefDeallocate(mService);
+      mService = nullptr;
+    }
+  }
+
   nsresult PostEvent(void(ServiceWatcher::*func)(void))
   {
     nsCOMPtr<nsIRunnable> ev = NS_NewRunnableMethod(this, func);
     return gSocketTransportService->Dispatch(ev, NS_DISPATCH_NORMAL);
   }
 
   void OnMsgClose()
   {
@@ -227,16 +240,17 @@ private:
     //
     // now, configure our poll flags for listening...
     //
     mPollFlags = (PR_POLL_READ | PR_POLL_EXCEPT);
 
     return NS_OK;
   }
 
+  nsCOMPtr<nsIThread> mThread;
   nsRefPtr<nsSocketTransportService> mSts;
   DNSServiceRef mService;
   PRFileDesc* mFD;
   bool mAttached;
 };
 
 NS_IMPL_ISUPPORTS(MDNSResponderOperator::ServiceWatcher, nsISupports)
 
--- a/widget/gonk/HwcComposer2D.cpp
+++ b/widget/gonk/HwcComposer2D.cpp
@@ -835,24 +835,17 @@ HwcComposer2D::TryHwComposition(nsScreen
     mHal->SetEGLInfo(aScreen->GetEGLDisplay(), aScreen->GetEGLSurface());
     return !mHal->Set(mList, aScreen->GetDisplayType());
 }
 
 bool
 HwcComposer2D::Render(nsIWidget* aWidget)
 {
     nsScreenGonk* screen = static_cast<nsWindow*>(aWidget)->GetScreen();
-    GetGonkDisplay()->SwapBuffers(screen->GetEGLDisplay(), screen->GetEGLSurface());
-
-    if (!mHal->HasHwc()) {
-        return true;
-    }
-
-    mHal->Prepare(nullptr, screen->GetDisplayType(), nullptr, -1);
-    return !mHal->Set(nullptr, screen->GetDisplayType());
+    return GetGonkDisplay()->SwapBuffers(screen->GetEGLDisplay(), screen->GetEGLSurface());
 }
 #endif
 
 bool
 HwcComposer2D::TryRenderWithHwc(Layer* aRoot,
                                 nsIWidget* aWidget,
                                 bool aGeometryChanged)
 {
--- a/widget/gonk/libdisplay/GonkDisplayICS.cpp
+++ b/widget/gonk/libdisplay/GonkDisplayICS.cpp
@@ -163,17 +163,24 @@ GonkDisplayICS::GetHWCDevice()
     return mHwc;
 }
 
 bool
 GonkDisplayICS::SwapBuffers(EGLDisplay dpy, EGLSurface sur)
 {
     // Should be called when composition rendering is complete for a frame.
     // Only HWC v1.0 needs this call. ICS gonk always needs the call.
-    return !mFBSurface->compositionComplete();
+    mFBSurface->compositionComplete();
+
+    if (!mHwc) {
+        return true;
+    }
+
+    mHwc->prepare(mHwc, nullptr);
+    return !mHwc->set(mHwc, dpy, sur, 0);
 }
 
 ANativeWindowBuffer*
 GonkDisplayICS::DequeueBuffer()
 {
     ANativeWindow *window = static_cast<ANativeWindow *>(mFBSurface.get());
     ANativeWindowBuffer *buf = nullptr;
     window->dequeueBuffer(window, &buf);