Merge m-c to inbound.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 10 Mar 2014 11:29:15 -0400
changeset 172782 4501b1da2d2adfebd4a25f50df34e84b525963f7
parent 172781 738dafa8f97fd6366744c32829431ed16475807a (current diff)
parent 172756 bd3c5ee5d463d0e2efbd0bc08f6256d64f95a7d2 (diff)
child 172783 ba330c1d6c8f9330ea7a1821713fe540cbecf2ae
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
milestone30.0a1
Merge m-c to inbound.
gfx/layers/composite/ContainerLayerComposite.cpp
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,18 +14,18 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1ad48c4be51b279f7f63c1a13025b52fe087d231">
     <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="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d11f524d00cacf5ba0dfbf25e4aa2158b1c3a036"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="456499c44d1ef39b602ea02e9ed460b6aab85b44"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
   <project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,18 +12,18 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="97a5b461686757dbb8ecab2aac5903e41d2e1afe">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <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"/>
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="9025e50b9d29b3cabbbb21e1dd94d0d13121a17e"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,19 +10,19 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="a9e08b91e9cd1f0930f16cfc49ec72f63575d5fe">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
   <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,18 +14,18 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1ad48c4be51b279f7f63c1a13025b52fe087d231">
     <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="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d11f524d00cacf5ba0dfbf25e4aa2158b1c3a036"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="456499c44d1ef39b602ea02e9ed460b6aab85b44"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
   <project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
         "remote": "", 
         "branch": "", 
         "revision": ""
     }, 
-    "revision": "a30074503b9be1198a496632099410f8cebe3773", 
+    "revision": "6064a315797a6db79e5ea926a69835b3d72e723b", 
     "repo_path": "/integration/gaia-central"
 }
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -12,18 +12,18 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1ad48c4be51b279f7f63c1a13025b52fe087d231">
     <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="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
   <project name="platform/bootable/recovery" path="bootable/recovery" revision="746bc48f34f5060f90801925dcdd964030c1ab6d"/>
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -10,18 +10,18 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1ad48c4be51b279f7f63c1a13025b52fe087d231">
     <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="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
   <project name="platform/bootable/recovery" path="bootable/recovery" revision="575fdbf046e966a5915b1f1e800e5d6ad0ea14c0"/>
--- a/b2g/config/inari/sources.xml
+++ b/b2g/config/inari/sources.xml
@@ -14,18 +14,18 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1ad48c4be51b279f7f63c1a13025b52fe087d231">
     <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="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/>
   <project name="platform/bootable/recovery" path="bootable/recovery" revision="e0a9ac010df3afaa47ba107192c05ac8b5516435"/>
--- a/b2g/config/leo/sources.xml
+++ b/b2g/config/leo/sources.xml
@@ -12,18 +12,18 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1ad48c4be51b279f7f63c1a13025b52fe087d231">
     <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="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/mako/sources.xml
+++ b/b2g/config/mako/sources.xml
@@ -12,18 +12,18 @@
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="97a5b461686757dbb8ecab2aac5903e41d2e1afe">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
-  <project name="gaia" path="gaia" remote="mozillaorg" revision="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <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"/>
   <project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="9025e50b9d29b3cabbbb21e1dd94d0d13121a17e"/>
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -12,18 +12,18 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="1ad48c4be51b279f7f63c1a13025b52fe087d231">
     <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="8c9191df3c107df4073f3ca63816a1d36c51af5d"/>
-  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="15e8982284c4560f9c74c2b9fe8bb361ebfe0cb6"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f1d4d4c6d0e6079b2f7228a7ae849d4608e2c076"/>
+  <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="353d422fcbd0b41b76e1262f0992a832420a7567"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="cf1dcc0704c0c1845f8a0a0b44838f7e0c0362c9"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="707630df1b4270eae3dd49b7344c645f32c1b5f4"/>
   <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
   <project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/>
--- a/content/media/encoder/VP8TrackEncoder.cpp
+++ b/content/media/encoder/VP8TrackEncoder.cpp
@@ -4,31 +4,34 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "VP8TrackEncoder.h"
 #include "vpx/vp8cx.h"
 #include "vpx/vpx_encoder.h"
 #include "VideoUtils.h"
 #include "prsystem.h"
 #include "WebMWriter.h"
+#include "libyuv.h"
 
 namespace mozilla {
 
 #ifdef PR_LOGGING
 PRLogModuleInfo* gVP8TrackEncoderLog;
 #define VP8LOG(msg, ...) PR_LOG(gVP8TrackEncoderLog, PR_LOG_DEBUG, \
                                   (msg, ##__VA_ARGS__))
 // Debug logging macro with object pointer and class name.
 #else
 #define VP8LOG(msg, ...)
 #endif
 
 #define DEFAULT_BITRATE 2500 // in kbit/s
 #define DEFAULT_ENCODE_FRAMERATE 30
 
+using namespace mozilla::layers;
+
 VP8TrackEncoder::VP8TrackEncoder()
   : VideoTrackEncoder()
   , mEncodedFrameDuration(0)
   , mEncodedTimestamp(0)
   , mRemainingTicks(0)
   , mVPXContext(new vpx_codec_ctx_t())
   , mVPXImageWrapper(new vpx_image_t())
 {
@@ -221,60 +224,145 @@ VP8TrackEncoder::GetEncodedPartitions(En
 }
 
 void VP8TrackEncoder::PrepareMutedFrame()
 {
   if (mMuteFrame.IsEmpty()) {
     CreateMutedFrame(&mMuteFrame);
   }
 
-  uint32_t yPlanSize = mFrameWidth * mFrameHeight;
+  uint32_t yPlaneSize = mFrameWidth * mFrameHeight;
   uint32_t halfWidth = (mFrameWidth + 1) / 2;
   uint32_t halfHeight = (mFrameHeight + 1) / 2;
-  uint32_t uvPlanSize = halfWidth * halfHeight;
+  uint32_t uvPlaneSize = halfWidth * halfHeight;
 
-  MOZ_ASSERT(mMuteFrame.Length() >= (yPlanSize + uvPlanSize));
+  MOZ_ASSERT(mMuteFrame.Length() >= (yPlaneSize + uvPlaneSize * 2));
   uint8_t *y = mMuteFrame.Elements();
-  uint8_t *cb = mMuteFrame.Elements() + yPlanSize;
-  uint8_t *cr = mMuteFrame.Elements() + yPlanSize + uvPlanSize;
+  uint8_t *cb = mMuteFrame.Elements() + yPlaneSize;
+  uint8_t *cr = mMuteFrame.Elements() + yPlaneSize + uvPlaneSize;
 
   mVPXImageWrapper->planes[PLANE_Y] = y;
   mVPXImageWrapper->planes[PLANE_U] = cb;
   mVPXImageWrapper->planes[PLANE_V] = cr;
   mVPXImageWrapper->stride[VPX_PLANE_Y] = mFrameWidth;
   mVPXImageWrapper->stride[VPX_PLANE_U] = halfWidth;
   mVPXImageWrapper->stride[VPX_PLANE_V] = halfWidth;
 }
 
+static bool isYUV420(const PlanarYCbCrImage::Data *aData)
+{
+  if (aData->mYSize == aData->mCbCrSize * 2) {
+    return true;
+  }
+  return false;
+}
+
+static bool isYUV422(const PlanarYCbCrImage::Data *aData)
+{
+  if ((aData->mYSize.width == aData->mCbCrSize.width * 2) &&
+      (aData->mYSize.height == aData->mCbCrSize.height)) {
+    return true;
+  }
+  return false;
+}
+
+static bool isYUV444(const PlanarYCbCrImage::Data *aData)
+{
+  if (aData->mYSize == aData->mCbCrSize) {
+    return true;
+  }
+  return false;
+}
+
 nsresult VP8TrackEncoder::PrepareRawFrame(VideoChunk &aChunk)
 {
   if (aChunk.mFrame.GetForceBlack() || aChunk.IsNull()) {
     PrepareMutedFrame();
   } else {
-    layers::Image* img = aChunk.mFrame.GetImage();
+    Image* img = aChunk.mFrame.GetImage();
     ImageFormat format = img->GetFormat();
     if (format != ImageFormat::PLANAR_YCBCR) {
       VP8LOG("Unsupported video format\n");
       return NS_ERROR_FAILURE;
     }
 
     // Cast away constness b/c some of the accessors are non-const
-    layers::PlanarYCbCrImage* yuv =
-    const_cast<layers::PlanarYCbCrImage *>(static_cast<const layers::PlanarYCbCrImage *>(img));
+    PlanarYCbCrImage* yuv =
+    const_cast<PlanarYCbCrImage *>(static_cast<const PlanarYCbCrImage *>(img));
     // Big-time assumption here that this is all contiguous data coming
     // from getUserMedia or other sources.
     MOZ_ASSERT(yuv);
-    const layers::PlanarYCbCrImage::Data *data = yuv->GetData();
+    const PlanarYCbCrImage::Data *data = yuv->GetData();
+
+    if (isYUV420(data) && !data->mCbSkip) { // 420 planar
+      mVPXImageWrapper->planes[PLANE_Y] = data->mYChannel;
+      mVPXImageWrapper->planes[PLANE_U] = data->mCbChannel;
+      mVPXImageWrapper->planes[PLANE_V] = data->mCrChannel;
+      mVPXImageWrapper->stride[VPX_PLANE_Y] = data->mYStride;
+      mVPXImageWrapper->stride[VPX_PLANE_U] = data->mCbCrStride;
+      mVPXImageWrapper->stride[VPX_PLANE_V] = data->mCbCrStride;
+    } else {
+      uint32_t yPlaneSize = mFrameWidth * mFrameHeight;
+      uint32_t halfWidth = (mFrameWidth + 1) / 2;
+      uint32_t halfHeight = (mFrameHeight + 1) / 2;
+      uint32_t uvPlaneSize = halfWidth * halfHeight;
+      if (mI420Frame.IsEmpty()) {
+        mI420Frame.SetLength(yPlaneSize + uvPlaneSize * 2);
+      }
+
+      MOZ_ASSERT(mI420Frame.Length() >= (yPlaneSize + uvPlaneSize * 2));
+      uint8_t *y = mI420Frame.Elements();
+      uint8_t *cb = mI420Frame.Elements() + yPlaneSize;
+      uint8_t *cr = mI420Frame.Elements() + yPlaneSize + uvPlaneSize;
 
-    mVPXImageWrapper->planes[PLANE_Y] = data->mYChannel;
-    mVPXImageWrapper->planes[PLANE_U] = data->mCbChannel;
-    mVPXImageWrapper->planes[PLANE_V] = data->mCrChannel;
-    mVPXImageWrapper->stride[VPX_PLANE_Y] = data->mYStride;
-    mVPXImageWrapper->stride[VPX_PLANE_U] = data->mCbCrStride;
-    mVPXImageWrapper->stride[VPX_PLANE_V] = data->mCbCrStride;
+      if (isYUV420(data) && data->mCbSkip) {
+        // If mCbSkip is set, we assume it's nv12 or nv21.
+        if (data->mCbChannel < data->mCrChannel) { // nv12
+          libyuv::NV12ToI420(data->mYChannel, data->mYStride,
+                             data->mCbChannel, data->mCbCrStride,
+                             y, mFrameWidth,
+                             cb, halfWidth,
+                             cr, halfWidth,
+                             mFrameWidth, mFrameHeight);
+        } else { // nv21
+          libyuv::NV21ToI420(data->mYChannel, data->mYStride,
+                             data->mCrChannel, data->mCbCrStride,
+                             y, mFrameWidth,
+                             cb, halfWidth,
+                             cr, halfWidth,
+                             mFrameWidth, mFrameHeight);
+        }
+      } else if (isYUV444(data) && !data->mCbSkip) {
+        libyuv::I444ToI420(data->mYChannel, data->mYStride,
+                           data->mCbChannel, data->mCbCrStride,
+                           data->mCrChannel, data->mCbCrStride,
+                           y, mFrameWidth,
+                           cb, halfWidth,
+                           cr, halfWidth,
+                           mFrameWidth, mFrameHeight);
+      } else if (isYUV422(data) && !data->mCbSkip) {
+        libyuv::I422ToI420(data->mYChannel, data->mYStride,
+                           data->mCbChannel, data->mCbCrStride,
+                           data->mCrChannel, data->mCbCrStride,
+                           y, mFrameWidth,
+                           cb, halfWidth,
+                           cr, halfWidth,
+                           mFrameWidth, mFrameHeight);
+      } else {
+        VP8LOG("Unsupported planar format\n");
+        return NS_ERROR_NOT_IMPLEMENTED;
+      }
+
+      mVPXImageWrapper->planes[PLANE_Y] = y;
+      mVPXImageWrapper->planes[PLANE_U] = cb;
+      mVPXImageWrapper->planes[PLANE_V] = cr;
+      mVPXImageWrapper->stride[VPX_PLANE_Y] = mFrameWidth;
+      mVPXImageWrapper->stride[VPX_PLANE_U] = halfWidth;
+      mVPXImageWrapper->stride[VPX_PLANE_V] = halfWidth;
+    }
   }
   return NS_OK;
 }
 
 // These two define value used in GetNextEncodeOperation to determine the
 // EncodeOperation for next target frame.
 #define I_FRAME_RATIO (0.5)
 #define SKIP_FRAME_RATIO (0.75)
--- a/content/media/encoder/VP8TrackEncoder.h
+++ b/content/media/encoder/VP8TrackEncoder.h
@@ -69,16 +69,19 @@ private:
   // Encoded timestamp.
   TrackTicks mEncodedTimestamp;
   // Duration to the next encode frame.
   TrackTicks mRemainingTicks;
 
   // Muted frame, we only create it once.
   nsTArray<uint8_t> mMuteFrame;
 
+  // I420 frame, convert the 4:4:4, 4:2:2 to I420.
+  nsTArray<uint8_t> mI420Frame;
+
   /**
    * A local segment queue which takes the raw data out from mRawSegment in the
    * call of GetEncodedTrack(). Since we implement the fixed FPS encoding
    * policy, it needs to be global in order to store the leftover segments
    * taken from mRawSegment.
    */
   VideoSegment mSourceSegment;
 
--- a/content/media/encoder/moz.build
+++ b/content/media/encoder/moz.build
@@ -30,14 +30,15 @@ if CONFIG['MOZ_OPUS']:
 
 if CONFIG['MOZ_WEBM_ENCODER']:
     EXPORTS += ['VorbisTrackEncoder.h',
                 'VP8TrackEncoder.h',
     ]
     UNIFIED_SOURCES += ['VorbisTrackEncoder.cpp',
                         'VP8TrackEncoder.cpp',
     ]
+    LOCAL_INCLUDES += ['/media/libyuv/include']
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'gklayout'
 
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/dom/camera/DOMCameraControl.cpp
+++ b/dom/camera/DOMCameraControl.cpp
@@ -823,18 +823,20 @@ nsDOMCameraControl::AutoFocus(CameraAuto
   MOZ_ASSERT(mCameraControl);
 
   nsCOMPtr<CameraAutoFocusCallback> cb = mAutoFocusOnSuccessCb.forget();
   bool cancel = false;
   if (cb) {
     // we have a callback, which means we're already in the process of
     // auto-focusing--cancel the old callback
     nsCOMPtr<CameraErrorCallback> ecb = mAutoFocusOnErrorCb.forget();
-    ErrorResult ignored;
-    ecb->Call(NS_LITERAL_STRING("Interrupted"), ignored);
+    if (ecb) {
+      ErrorResult ignored;
+      ecb->Call(NS_LITERAL_STRING("Interrupted"), ignored);
+    }
     cancel = true;
   }
 
   mAutoFocusOnSuccessCb = &aOnSuccess;
   mAutoFocusOnErrorCb = nullptr;
   if (aOnError.WasPassed()) {
     mAutoFocusOnErrorCb = &aOnError.Value();
   }
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -32,16 +32,17 @@
 #include "mozilla/dom/PMemoryReportRequestParent.h"
 #include "mozilla/dom/power/PowerManagerService.h"
 #include "mozilla/dom/DOMStorageIPC.h"
 #include "mozilla/dom/bluetooth/PBluetoothParent.h"
 #include "mozilla/dom/PFMRadioParent.h"
 #include "mozilla/dom/devicestorage/DeviceStorageRequestParent.h"
 #include "mozilla/dom/GeolocationBinding.h"
 #include "mozilla/dom/telephony/TelephonyParent.h"
+#include "mozilla/dom/time/DateCacheCleaner.h"
 #include "mozilla/dom/FileSystemRequestParent.h"
 #include "SmsParent.h"
 #include "mozilla/hal_sandbox/PHalParent.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/BackgroundParent.h"
 #include "mozilla/ipc/TestShellParent.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 #include "mozilla/layers/CompositorParent.h"
@@ -484,16 +485,18 @@ ContentParent::StartUp()
 {
     if (XRE_GetProcessType() != GeckoProcessType_Default) {
         return;
     }
 
     // Note: This reporter measures all ContentParents.
     RegisterStrongMemoryReporter(new ContentParentsMemoryReporter());
 
+    mozilla::dom::time::InitializeDateCacheCleaner();
+
     BackgroundChild::Startup();
 
     sCanLaunchSubprocesses = true;
 
     // Try to preallocate a process that we can transform into an app later.
     PreallocatedProcessManager::AllocateAfterDelay();
 
     // Test the PBackground infrastructure on ENABLE_TESTS builds when a special
--- a/gfx/layers/composite/ColorLayerComposite.cpp
+++ b/gfx/layers/composite/ColorLayerComposite.cpp
@@ -18,17 +18,17 @@
 #include "nsRect.h"                     // for nsIntRect
 
 namespace mozilla {
 namespace layers {
 
 void
 ColorLayerComposite::RenderLayer(const nsIntRect& aClipRect)
 {
-  EffectChain effects;
+  EffectChain effects(this);
   gfxRGBA color(GetColor());
   effects.mPrimaryEffect = new EffectSolidColor(gfx::Color(color.r,
                                                            color.g,
                                                            color.b,
                                                            color.a));
   nsIntRect boundRect = GetBounds();
 
   LayerManagerComposite::AutoAddMaskEffect autoMaskEffect(GetMaskLayer(),
--- a/gfx/layers/composite/ContainerLayerComposite.cpp
+++ b/gfx/layers/composite/ContainerLayerComposite.cpp
@@ -370,17 +370,17 @@ ContainerRender(ContainerT* aContainer,
 #ifdef MOZ_DUMP_PAINTING
     if (gfxUtils::sDumpPainting) {
       RefPtr<gfx::DataSourceSurface> surf = surface->Dump(aManager->GetCompositor());
       WriteSnapshotToDumpFile(aContainer, surf);
     }
 #endif
 
     compositor->SetRenderTarget(previousTarget);
-    EffectChain effectChain;
+    EffectChain effectChain(aContainer);
     LayerManagerComposite::AutoAddMaskEffect autoMaskEffect(aContainer->GetMaskLayer(),
                                                             effectChain,
                                                             !aContainer->GetTransform().CanDraw2D());
 
     effectChain.mPrimaryEffect = new EffectRenderTarget(surface);
 
     gfx::Rect rect(visibleRect.x, visibleRect.y, visibleRect.width, visibleRect.height);
     gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
--- a/gfx/layers/composite/ImageLayerComposite.cpp
+++ b/gfx/layers/composite/ImageLayerComposite.cpp
@@ -93,17 +93,17 @@ ImageLayerComposite::RenderLayer(const n
   if (gfxUtils::sDumpPainting) {
     RefPtr<gfx::DataSourceSurface> surf = mImageHost->GetAsSurface();
     WriteSnapshotToDumpFile(this, surf);
   }
 #endif
 
   mCompositor->MakeCurrent();
 
-  EffectChain effectChain;
+  EffectChain effectChain(this);
   LayerManagerComposite::AutoAddMaskEffect autoMaskEffect(mMaskLayer, effectChain);
 
   gfx::Rect clipRect(aClipRect.x, aClipRect.y, aClipRect.width, aClipRect.height);
   mImageHost->SetCompositor(mCompositor);
   mImageHost->Composite(effectChain,
                         GetEffectiveOpacity(),
                         GetEffectiveTransform(),
                         gfx::ToFilter(mFilter),
--- a/gfx/layers/composite/ThebesLayerComposite.cpp
+++ b/gfx/layers/composite/ThebesLayerComposite.cpp
@@ -121,17 +121,17 @@ ThebesLayerComposite::RenderLayer(const 
   if (gfxUtils::sDumpPainting) {
     RefPtr<gfx::DataSourceSurface> surf = mBuffer->GetAsSurface();
     if (surf) {
       WriteSnapshotToDumpFile(this, surf);
     }
   }
 #endif
 
-  EffectChain effectChain;
+  EffectChain effectChain(this);
   LayerManagerComposite::AutoAddMaskEffect autoMaskEffect(mMaskLayer, effectChain);
 
   nsIntRegion visibleRegion = GetEffectiveVisibleRegion();
 
   TiledLayerProperties tiledLayerProps;
   if (mRequiresTiledProperties) {
     tiledLayerProps.mVisibleRegion = visibleRegion;
     tiledLayerProps.mEffectiveResolution = GetEffectiveResolution();
--- a/ipc/unixfd/UnixSocketWatcher.cpp
+++ b/ipc/unixfd/UnixSocketWatcher.cpp
@@ -93,21 +93,24 @@ void
 UnixSocketWatcher::OnFileCanReadWithoutBlocking(int aFd)
 {
   MOZ_ASSERT(MessageLoopForIO::current() == GetIOLoop());
   MOZ_ASSERT(aFd == GetFd());
 
   if (mConnectionStatus == SOCKET_IS_CONNECTED) {
     OnSocketCanReceiveWithoutBlocking();
   } else if (mConnectionStatus == SOCKET_IS_LISTENING) {
-    int fd = TEMP_FAILURE_RETRY(accept(GetFd(), NULL, NULL));
+    sockaddr_any addr;
+    socklen_t addrLen = sizeof(addr);
+    int fd = TEMP_FAILURE_RETRY(accept(GetFd(),
+      reinterpret_cast<struct sockaddr*>(&addr), &addrLen));
     if (fd < 0) {
       OnError("accept", errno);
     } else {
-      OnAccepted(fd);
+      OnAccepted(fd, &addr, addrLen);
     }
   } else {
     NS_NOTREACHED("invalid connection state for reading");
   }
 }
 
 void
 UnixSocketWatcher::OnFileCanWriteWithoutBlocking(int aFd)
--- a/ipc/unixfd/UnixSocketWatcher.h
+++ b/ipc/unixfd/UnixSocketWatcher.h
@@ -2,21 +2,44 @@
 /* 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_ipc_UnixSocketWatcher_h
 #define mozilla_ipc_UnixSocketWatcher_h
 
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <netinet/in.h>
+#ifdef MOZ_B2G_BT_BLUEZ
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/sco.h>
+#include <bluetooth/l2cap.h>
+#include <bluetooth/rfcomm.h>
+#endif
 #include "UnixFdWatcher.h"
 
 namespace mozilla {
 namespace ipc {
 
+union sockaddr_any {
+  sockaddr_storage storage; // address-family only
+  sockaddr_un un;
+  sockaddr_in in;
+  sockaddr_in6 in6;
+#ifdef MOZ_B2G_BT_BLUEZ
+  sockaddr_sco sco;
+  sockaddr_rc rc;
+  sockaddr_l2 l2;
+#endif
+  // ... others
+};
+
 class UnixSocketWatcher : public UnixFdWatcher
 {
 public:
   enum ConnectionStatus {
     SOCKET_IS_DISCONNECTED = 0,
     SOCKET_IS_LISTENING,
     SOCKET_IS_CONNECTING,
     SOCKET_IS_CONNECTED
@@ -29,21 +52,22 @@ public:
   ConnectionStatus GetConnectionStatus() const
   {
     return mConnectionStatus;
   }
 
   // Connect to a peer
   nsresult Connect(const struct sockaddr* aAddr, socklen_t aAddrLen);
 
-  // Listen on socket for incomming connection requests
+  // Listen on socket for incoming connection requests
   nsresult Listen(const struct sockaddr* aAddr, socklen_t aAddrLen);
 
   // Callback method for accepted connections
-  virtual void OnAccepted(int aFd) {};
+  virtual void OnAccepted(int aFd, const sockaddr_any* aAddr,
+                          socklen_t aAddrLen) {};
 
   // Callback method for successful connection requests
   virtual void OnConnected() {};
 
   // Callback method for successful listen requests
   virtual void OnListening() {};
 
   // Callback method for receiving from socket
--- a/ipc/unixsocket/UnixSocket.cpp
+++ b/ipc/unixsocket/UnixSocket.cpp
@@ -1,16 +1,15 @@
 /* -*- 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/. */
 
 #include "UnixSocket.h"
-#include "mozilla/ipc/UnixSocketWatcher.h"
 #include "nsTArray.h"
 #include "nsXULAppAPI.h"
 #include <fcntl.h>
 
 static const size_t MAX_READ_SIZE = 1 << 16;
 
 namespace mozilla {
 namespace ipc {
@@ -114,17 +113,18 @@ public:
 
   /**
    * Consumer pointer. Non-thread safe RefPtr, so should only be manipulated
    * directly from main thread. All non-main-thread accesses should happen with
    * mImpl as container.
    */
   RefPtr<UnixSocketConsumer> mConsumer;
 
-  void OnAccepted(int aFd) MOZ_OVERRIDE;
+  void OnAccepted(int aFd, const sockaddr_any* aAddr,
+                  socklen_t aAddrLen) MOZ_OVERRIDE;
   void OnConnected() MOZ_OVERRIDE;
   void OnError(const char* aFunction, int aErrno) MOZ_OVERRIDE;
   void OnListening() MOZ_OVERRIDE;
   void OnSocketCanReceiveWithoutBlocking() MOZ_OVERRIDE;
   void OnSocketCanSendWithoutBlocking() MOZ_OVERRIDE;
 
 private:
   // Set up flags on whatever our current file descriptor is.
@@ -548,20 +548,27 @@ UnixSocketImpl::SetSocketFlags(int aFd)
   if (-1 == TEMP_FAILURE_RETRY(fcntl(aFd, F_SETFL, flags))) {
     return false;
   }
 
   return true;
 }
 
 void
-UnixSocketImpl::OnAccepted(int aFd)
+UnixSocketImpl::OnAccepted(int aFd,
+                           const sockaddr_any* aAddr,
+                           socklen_t aAddrLen)
 {
   MOZ_ASSERT(MessageLoopForIO::current() == GetIOLoop());
   MOZ_ASSERT(GetConnectionStatus() == SOCKET_IS_LISTENING);
+  MOZ_ASSERT(aAddr);
+  MOZ_ASSERT(aAddrLen <= sizeof(mAddr));
+
+  memcpy (&mAddr, aAddr, aAddrLen);
+  mAddrSize = aAddrLen;
 
   if (!mConnector->SetUp(aFd)) {
     NS_WARNING("Could not set up socket!");
     return;
   }
 
   RemoveWatchers(READ_WATCHER|WRITE_WATCHER);
   Close();
--- a/ipc/unixsocket/UnixSocket.h
+++ b/ipc/unixsocket/UnixSocket.h
@@ -3,48 +3,26 @@
 /* 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_ipc_UnixSocket_h
 #define mozilla_ipc_UnixSocket_h
 
 
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <netinet/in.h>
-#ifdef MOZ_B2G_BT_BLUEZ
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/sco.h>
-#include <bluetooth/l2cap.h>
-#include <bluetooth/rfcomm.h>
-#endif
 #include <stdlib.h>
+#include "nsAutoPtr.h"
 #include "nsString.h"
-#include "nsAutoPtr.h"
+#include "nsThreadUtils.h"
+#include "mozilla/ipc/UnixSocketWatcher.h"
 #include "mozilla/RefPtr.h"
-#include "nsThreadUtils.h"
 
 namespace mozilla {
 namespace ipc {
 
-union sockaddr_any {
-  sockaddr_storage storage; // address-family only
-  sockaddr_un un;
-  sockaddr_in in;
-  sockaddr_in6 in6;
-#ifdef MOZ_B2G_BT_BLUEZ
-  sockaddr_sco sco;
-  sockaddr_rc rc;
-  sockaddr_l2 l2;
-#endif
-  // ... others
-};
-
 class UnixSocketRawData
 {
 public:
   // Number of octets in mData.
   size_t mSize;
   size_t mCurrentWriteOffset;
   nsAutoArrayPtr<uint8_t> mData;