зеркало из https://github.com/mozilla/gecko-dev.git
merge b2g-inbound to mozilla-central a=merge
This commit is contained in:
Коммит
1c98d0eb68
|
@ -15,15 +15,15 @@
|
|||
<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="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<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="cacd27c973f6c84d13a67adaf5d6fce4ae898e9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="62682dcee5368fe43284efa4e90f22cb1c88b79e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
<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="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<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="cacd27c973f6c84d13a67adaf5d6fce4ae898e9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="62682dcee5368fe43284efa4e90f22cb1c88b79e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<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="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8bc59310552179f9a8bc6cdd0188e2475df52fb7"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9d0e5057ee5404a31ec1bf76131cb11336a7c3b6"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</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="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="cacd27c973f6c84d13a67adaf5d6fce4ae898e9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="62682dcee5368fe43284efa4e90f22cb1c88b79e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
<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="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<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="cacd27c973f6c84d13a67adaf5d6fce4ae898e9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="62682dcee5368fe43284efa4e90f22cb1c88b79e"/>
|
||||
<!-- 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"/>
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<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="cacd27c973f6c84d13a67adaf5d6fce4ae898e9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="62682dcee5368fe43284efa4e90f22cb1c88b79e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
|
||||
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<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="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8bc59310552179f9a8bc6cdd0188e2475df52fb7"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9d0e5057ee5404a31ec1bf76131cb11336a7c3b6"/>
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
<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="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<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="cacd27c973f6c84d13a67adaf5d6fce4ae898e9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="62682dcee5368fe43284efa4e90f22cb1c88b79e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"git": {
|
||||
"git_revision": "4fe0507781f3ed56c8ae5e66dd9489165d1ff68e",
|
||||
"git_revision": "805cf546729ba742bf23febda52970fcb35c0e8f",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "59fc14fbf1eb5d1985442274ba4f414097156479",
|
||||
"revision": "669a688b25adf51474f17cc6febdf2a4ba626b93",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</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="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="cacd27c973f6c84d13a67adaf5d6fce4ae898e9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="62682dcee5368fe43284efa4e90f22cb1c88b79e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="4fe0507781f3ed56c8ae5e66dd9489165d1ff68e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="805cf546729ba742bf23febda52970fcb35c0e8f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<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="cacd27c973f6c84d13a67adaf5d6fce4ae898e9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="62682dcee5368fe43284efa4e90f22cb1c88b79e"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
|
||||
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "BluetoothDaemonConnector.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/un.h>
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
@ -15,10 +16,14 @@ BEGIN_BLUETOOTH_NAMESPACE
|
|||
BluetoothDaemonConnector::BluetoothDaemonConnector(
|
||||
const nsACString& aSocketName)
|
||||
: mSocketName(aSocketName)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(BluetoothDaemonConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
BluetoothDaemonConnector::~BluetoothDaemonConnector()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(BluetoothDaemonConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothDaemonConnector::CreateSocket(int& aFd) const
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "mozilla/ipc/UnixSocketWatcher.h"
|
||||
#include "mozilla/FileUtils.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
using namespace mozilla::ipc;
|
||||
|
@ -78,11 +79,15 @@ public:
|
|||
, mConsumer(aConsumer)
|
||||
, mShuttingDownOnIOThread(false)
|
||||
, mConnectionStatus(SOCKET_IS_DISCONNECTED)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(DroidSocketImpl, DataSocketIO);
|
||||
}
|
||||
|
||||
~DroidSocketImpl()
|
||||
{
|
||||
MOZ_ASSERT(IsConsumerThread());
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(DroidSocketImpl, DataSocketIO);
|
||||
}
|
||||
|
||||
void Send(UnixSocketIOBuffer* aBuffer)
|
||||
|
@ -109,7 +114,7 @@ public:
|
|||
|
||||
BluetoothSocket* GetBluetoothSocket()
|
||||
{
|
||||
return mConsumer.get();
|
||||
return mConsumer;
|
||||
}
|
||||
|
||||
DataSocket* GetDataSocket()
|
||||
|
@ -118,11 +123,11 @@ public:
|
|||
}
|
||||
|
||||
/**
|
||||
* Consumer pointer. Non-thread safe RefPtr, so should only be manipulated
|
||||
* Consumer pointer. Non-thread-safe pointer, so should only be manipulated
|
||||
* directly from consumer thread. All non-consumer-thread accesses should
|
||||
* happen with mImpl as container.
|
||||
*/
|
||||
RefPtr<BluetoothSocket> mConsumer;
|
||||
BluetoothSocket* mConsumer;
|
||||
|
||||
// Methods for |DataSocket|
|
||||
//
|
||||
|
@ -582,10 +587,17 @@ BluetoothSocket::BluetoothSocket(BluetoothSocketObserver* aObserver)
|
|||
{
|
||||
MOZ_ASSERT(aObserver);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(BluetoothSocket, DataSocket);
|
||||
|
||||
EnsureBluetoothSocketHalLoad();
|
||||
mDeviceAddress.AssignLiteral(BLUETOOTH_ADDRESS_NONE);
|
||||
}
|
||||
|
||||
BluetoothSocket::~BluetoothSocket()
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(BluetoothSocket, DataSocket);
|
||||
}
|
||||
|
||||
class ConnectSocketResultHandler final : public BluetoothSocketResultHandler
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -22,6 +22,7 @@ class BluetoothSocket final : public mozilla::ipc::DataSocket
|
|||
{
|
||||
public:
|
||||
BluetoothSocket(BluetoothSocketObserver* aObserver);
|
||||
~BluetoothSocket();
|
||||
|
||||
nsresult Connect(const nsAString& aDeviceAddress,
|
||||
const BluetoothUuid& aServiceUuid,
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "BluetoothSocketObserver.h"
|
||||
#include "BluetoothUnixSocketConnector.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
using namespace mozilla::ipc;
|
||||
|
@ -93,11 +94,11 @@ private:
|
|||
void FireSocketError();
|
||||
|
||||
/**
|
||||
* Consumer pointer. Non-thread safe RefPtr, so should only be manipulated
|
||||
* Consumer pointer. Non-thread-safe pointer, so should only be manipulated
|
||||
* directly from consumer thread. All non-consumer-thread accesses should
|
||||
* happen with mIO as container.
|
||||
*/
|
||||
RefPtr<BluetoothSocket> mConsumer;
|
||||
BluetoothSocket* mConsumer;
|
||||
|
||||
/**
|
||||
* Connector object used to create the connection we are currently using.
|
||||
|
@ -146,12 +147,16 @@ BluetoothSocket::BluetoothSocketIO::BluetoothSocketIO(
|
|||
{
|
||||
MOZ_ASSERT(mConsumer);
|
||||
MOZ_ASSERT(mConnector);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(BluetoothSocketIO, DataSocketIO);
|
||||
}
|
||||
|
||||
BluetoothSocket::BluetoothSocketIO::~BluetoothSocketIO()
|
||||
{
|
||||
MOZ_ASSERT(IsConsumerThread());
|
||||
MOZ_ASSERT(IsShutdownOnConsumerThread());
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(BluetoothSocketIO, DataSocketIO);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -178,7 +183,7 @@ BluetoothSocket::BluetoothSocketIO::GetSocketAddr(nsAString& aAddrStr) const
|
|||
BluetoothSocket*
|
||||
BluetoothSocket::BluetoothSocketIO::GetBluetoothSocket()
|
||||
{
|
||||
return mConsumer.get();
|
||||
return mConsumer;
|
||||
}
|
||||
|
||||
DataSocket*
|
||||
|
@ -562,11 +567,15 @@ BluetoothSocket::BluetoothSocket(BluetoothSocketObserver* aObserver)
|
|||
, mIO(nullptr)
|
||||
{
|
||||
MOZ_ASSERT(aObserver);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(BluetoothSocket, DataSocket);
|
||||
}
|
||||
|
||||
BluetoothSocket::~BluetoothSocket()
|
||||
{
|
||||
MOZ_ASSERT(!mIO);
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(BluetoothSocket, DataSocket);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsThreadUtils.h" // For NS_IsMainThread.
|
||||
|
||||
using namespace mozilla::ipc;
|
||||
|
@ -52,10 +53,14 @@ BluetoothUnixSocketConnector::BluetoothUnixSocketConnector(
|
|||
, mChannel(aChannel)
|
||||
, mAuth(aAuth)
|
||||
, mEncrypt(aEncrypt)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(BluetoothUnixSocketConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
BluetoothUnixSocketConnector::~BluetoothUnixSocketConnector()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(BluetoothUnixSocketConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothUnixSocketConnector::CreateSocket(int& aFd) const
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "DaemonSocket.h"
|
||||
#include "mozilla/ipc/DaemonSocketConsumer.h"
|
||||
#include "mozilla/ipc/DaemonSocketPDU.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
|
||||
#ifdef CHROMIUM_LOG
|
||||
#undef CHROMIUM_LOG
|
||||
|
@ -38,6 +39,8 @@ public:
|
|||
DaemonSocket* aConnection,
|
||||
DaemonSocketIOConsumer* aConsumer);
|
||||
|
||||
~DaemonSocketIO();
|
||||
|
||||
// Methods for |DataSocketIO|
|
||||
//
|
||||
|
||||
|
@ -82,6 +85,13 @@ DaemonSocketIO::DaemonSocketIO(
|
|||
{
|
||||
MOZ_ASSERT(mConnection);
|
||||
MOZ_ASSERT(mConsumer);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(DaemonSocketIO, ConnectionOrientedSocketIO);
|
||||
}
|
||||
|
||||
DaemonSocketIO::~DaemonSocketIO()
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(DaemonSocketIO, ConnectionOrientedSocketIO);
|
||||
}
|
||||
|
||||
// |DataSocketIO|
|
||||
|
@ -169,10 +179,14 @@ DaemonSocket::DaemonSocket(
|
|||
, mIndex(aIndex)
|
||||
{
|
||||
MOZ_ASSERT(mConsumer);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(DaemonSocket, ConnectionOrientedSocket);
|
||||
}
|
||||
|
||||
DaemonSocket::~DaemonSocket()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(DaemonSocket, ConnectionOrientedSocket);
|
||||
}
|
||||
|
||||
// |ConnectionOrientedSocket|
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "DaemonSocketPDU.h"
|
||||
#include "mozilla/ipc/DaemonSocketConsumer.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
|
||||
#ifdef CHROMIUM_LOG
|
||||
#undef CHROMIUM_LOG
|
||||
|
@ -32,6 +33,8 @@ DaemonSocketPDU::DaemonSocketPDU(uint8_t aService, uint8_t aOpcode,
|
|||
: mConsumer(nullptr)
|
||||
, mUserData(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(DaemonSocketPDU, UnixSocketIOBuffer);
|
||||
|
||||
// Allocate memory
|
||||
size_t availableSpace = HEADER_SIZE + aPayloadSize;
|
||||
ResetBuffer(new uint8_t[availableSpace], 0, 0, availableSpace);
|
||||
|
@ -50,12 +53,16 @@ DaemonSocketPDU::DaemonSocketPDU(size_t aPayloadSize)
|
|||
: mConsumer(nullptr)
|
||||
, mUserData(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(DaemonSocketPDU, UnixSocketIOBuffer);
|
||||
|
||||
size_t availableSpace = HEADER_SIZE + aPayloadSize;
|
||||
ResetBuffer(new uint8_t[availableSpace], 0, 0, availableSpace);
|
||||
}
|
||||
|
||||
DaemonSocketPDU::~DaemonSocketPDU()
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(DaemonSocketPDU, UnixSocketIOBuffer);
|
||||
|
||||
nsAutoArrayPtr<uint8_t> data(GetBuffer());
|
||||
ResetBuffer(nullptr, 0, 0, 0);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <pwd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/un.h>
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsThreadUtils.h" // For NS_IsMainThread.
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
|
@ -26,10 +27,14 @@ static const char KEYSTORE_SOCKET_PATH[] = "/dev/socket/keystore";
|
|||
|
||||
KeyStoreConnector::KeyStoreConnector(const char** const aAllowedUsers)
|
||||
: mAllowedUsers(aAllowedUsers)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(KeyStoreConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
KeyStoreConnector::~KeyStoreConnector()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(KeyStoreConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
nsresult
|
||||
KeyStoreConnector::CreateSocket(int& aFd) const
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "NfcConnector.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/un.h>
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsThreadUtils.h" // For NS_IsMainThread.
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -15,10 +16,14 @@ namespace ipc {
|
|||
|
||||
NfcConnector::NfcConnector(const nsACString& aAddressString)
|
||||
: mAddressString(aAddressString)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(NfcConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
NfcConnector::~NfcConnector()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(NfcConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
nsresult
|
||||
NfcConnector::CreateSocket(int& aFd) const
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "RilConnector.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsThreadUtils.h" // For NS_IsMainThread.
|
||||
|
||||
#ifdef AF_INET
|
||||
|
@ -27,10 +28,14 @@ RilConnector::RilConnector(const nsACString& aAddressString,
|
|||
unsigned long aClientId)
|
||||
: mAddressString(aAddressString)
|
||||
, mClientId(aClientId)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(RilConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
RilConnector::~RilConnector()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(RilConnector, UnixSocketConnector);
|
||||
}
|
||||
|
||||
nsresult
|
||||
RilConnector::CreateSocket(int aDomain, int& aFd) const
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "mozilla/dom/workers/Workers.h"
|
||||
#include "mozilla/ipc/UnixSocketConnector.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "RilSocketConsumer.h"
|
||||
|
||||
|
@ -108,12 +109,16 @@ RilSocketIO::RilSocketIO(WorkerCrossThreadDispatcher* aDispatcher,
|
|||
{
|
||||
MOZ_ASSERT(mDispatcher);
|
||||
MOZ_ASSERT(mRilSocket);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(RilSocketIO, ConnectionOrientedSocketIO);
|
||||
}
|
||||
|
||||
RilSocketIO::~RilSocketIO()
|
||||
{
|
||||
MOZ_ASSERT(IsConsumerThread());
|
||||
MOZ_ASSERT(IsShutdownOnConsumerThread());
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(RilSocketIO, ConnectionOrientedSocketIO);
|
||||
}
|
||||
|
||||
RilSocket*
|
||||
|
@ -324,11 +329,15 @@ RilSocket::RilSocket(WorkerCrossThreadDispatcher* aDispatcher,
|
|||
{
|
||||
MOZ_ASSERT(mDispatcher);
|
||||
MOZ_ASSERT(mConsumer);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(RilSocket, ConnectionOrientedSocket);
|
||||
}
|
||||
|
||||
RilSocket::~RilSocket()
|
||||
{
|
||||
MOZ_ASSERT(!mIO);
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(RilSocket, ConnectionOrientedSocket);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ConnectionOrientedSocket.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "UnixSocketConnector.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -25,6 +26,8 @@ ConnectionOrientedSocketIO::ConnectionOrientedSocketIO(
|
|||
, mPeerAddressLength(0)
|
||||
{
|
||||
MOZ_ASSERT(mConnector);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(ConnectionOrientedSocketIO, DataSocketIO);
|
||||
}
|
||||
|
||||
ConnectionOrientedSocketIO::ConnectionOrientedSocketIO(
|
||||
|
@ -37,10 +40,14 @@ ConnectionOrientedSocketIO::ConnectionOrientedSocketIO(
|
|||
, mPeerAddressLength(0)
|
||||
{
|
||||
MOZ_ASSERT(mConnector);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(ConnectionOrientedSocketIO, DataSocketIO);
|
||||
}
|
||||
|
||||
ConnectionOrientedSocketIO::~ConnectionOrientedSocketIO()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(ConnectionOrientedSocketIO, DataSocketIO);
|
||||
}
|
||||
|
||||
nsresult
|
||||
ConnectionOrientedSocketIO::Accept(int aFd,
|
||||
|
@ -181,8 +188,15 @@ ConnectionOrientedSocketIO::OnError(const char* aFunction, int aErrno)
|
|||
// ConnectionOrientedSocket
|
||||
//
|
||||
|
||||
ConnectionOrientedSocket::ConnectionOrientedSocket()
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(ConnectionOrientedSocket, DataSocket);
|
||||
}
|
||||
|
||||
ConnectionOrientedSocket::~ConnectionOrientedSocket()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(ConnectionOrientedSocket, DataSocket);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* 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_connectionorientedsocket_h
|
||||
#define mozilla_ipc_connectionorientedsocket_h
|
||||
#ifndef mozilla_ipc_ConnectionOrientedSocket_h
|
||||
#define mozilla_ipc_ConnectionOrientedSocket_h
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include "DataSocket.h"
|
||||
|
@ -112,10 +112,11 @@ public:
|
|||
ConnectionOrientedSocketIO*& aIO) = 0;
|
||||
|
||||
protected:
|
||||
ConnectionOrientedSocket();
|
||||
virtual ~ConnectionOrientedSocket();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // mozilla_ipc_ConnectionOrientedSocket
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include "mozilla/ipc/DataSocket.h"
|
||||
#include "DataSocket.h"
|
||||
#ifdef MOZ_TASK_TRACER
|
||||
#include "GeckoTaskTracer.h"
|
||||
#endif
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
|
||||
#ifdef MOZ_TASK_TRACER
|
||||
using namespace mozilla::tasktracer;
|
||||
|
@ -23,7 +24,9 @@ namespace ipc {
|
|||
//
|
||||
|
||||
DataSocketIO::~DataSocketIO()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(DataSocketIO, SocketIOBase);
|
||||
}
|
||||
|
||||
void
|
||||
DataSocketIO::EnqueueData(UnixSocketIOBuffer* aBuffer)
|
||||
|
@ -111,14 +114,23 @@ DataSocketIO::SendPendingData(int aFd)
|
|||
|
||||
DataSocketIO::DataSocketIO(MessageLoop* aConsumerLoop)
|
||||
: SocketIOBase(aConsumerLoop)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(DataSocketIO, SocketIOBase);
|
||||
}
|
||||
|
||||
//
|
||||
// DataSocket
|
||||
//
|
||||
|
||||
DataSocket::DataSocket()
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(DataSocket, SocketBase);
|
||||
}
|
||||
|
||||
DataSocket::~DataSocket()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(DataSocket, SocketBase);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,9 @@ public:
|
|||
* @param aBuffer Data to be sent to socket
|
||||
*/
|
||||
virtual void SendSocketData(UnixSocketIOBuffer* aBuffer) = 0;
|
||||
|
||||
protected:
|
||||
DataSocket();
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "DataSocket.h"
|
||||
#include "ListenSocketConsumer.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "UnixSocketConnector.h"
|
||||
|
||||
|
@ -66,11 +67,11 @@ private:
|
|||
void FireSocketError();
|
||||
|
||||
/**
|
||||
* Consumer pointer. Non-thread safe RefPtr, so should only be manipulated
|
||||
* Consumer pointer. Non-thread-safe pointer, so should only be manipulated
|
||||
* directly from consumer thread. All non-consumer-thread accesses should
|
||||
* happen with mIO as container.
|
||||
*/
|
||||
RefPtr<ListenSocket> mListenSocket;
|
||||
ListenSocket* mListenSocket;
|
||||
|
||||
/**
|
||||
* Connector object used to create the connection we are currently using.
|
||||
|
@ -109,12 +110,16 @@ ListenSocketIO::ListenSocketIO(MessageLoop* aConsumerLoop,
|
|||
{
|
||||
MOZ_ASSERT(mListenSocket);
|
||||
MOZ_ASSERT(mConnector);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(ListenSocketIO, SocketIOBase);
|
||||
}
|
||||
|
||||
ListenSocketIO::~ListenSocketIO()
|
||||
{
|
||||
MOZ_ASSERT(IsConsumerThread());
|
||||
MOZ_ASSERT(IsShutdownOnConsumerThread());
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(ListenSocketIO, SocketIOBase);
|
||||
}
|
||||
|
||||
UnixSocketConnector*
|
||||
|
@ -226,7 +231,7 @@ ListenSocketIO::OnSocketCanAcceptWithoutBlocking()
|
|||
SocketBase*
|
||||
ListenSocketIO::GetSocketBase()
|
||||
{
|
||||
return mListenSocket.get();
|
||||
return mListenSocket;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -266,15 +271,21 @@ ListenSocketIO::ShutdownOnIOThread()
|
|||
// Socket tasks
|
||||
//
|
||||
|
||||
class ListenSocketIO::ListenTask final
|
||||
: public SocketIOTask<ListenSocketIO>
|
||||
class ListenSocketIO::ListenTask final : public SocketIOTask<ListenSocketIO>
|
||||
{
|
||||
public:
|
||||
ListenTask(ListenSocketIO* aIO, ConnectionOrientedSocketIO* aCOSocketIO)
|
||||
: SocketIOTask<ListenSocketIO>(aIO)
|
||||
, mCOSocketIO(aCOSocketIO)
|
||||
: SocketIOTask<ListenSocketIO>(aIO)
|
||||
, mCOSocketIO(aCOSocketIO)
|
||||
{
|
||||
MOZ_ASSERT(mCOSocketIO);
|
||||
|
||||
MOZ_COUNT_CTOR(ListenTask);
|
||||
}
|
||||
|
||||
~ListenTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ListenTask);
|
||||
}
|
||||
|
||||
void Run() override
|
||||
|
@ -291,7 +302,7 @@ private:
|
|||
};
|
||||
|
||||
//
|
||||
// UnixSocketConsumer
|
||||
// ListenSocket
|
||||
//
|
||||
|
||||
ListenSocket::ListenSocket(ListenSocketConsumer* aConsumer, int aIndex)
|
||||
|
@ -300,11 +311,15 @@ ListenSocket::ListenSocket(ListenSocketConsumer* aConsumer, int aIndex)
|
|||
, mIndex(aIndex)
|
||||
{
|
||||
MOZ_ASSERT(mConsumer);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(ListenSocket, SocketBase);
|
||||
}
|
||||
|
||||
ListenSocket::~ListenSocket()
|
||||
{
|
||||
MOZ_ASSERT(!mIO);
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(ListenSocket, SocketBase);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
* 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_listensocket_h
|
||||
#define mozilla_ipc_listensocket_h
|
||||
#ifndef mozilla_ipc_ListenSocket_h
|
||||
#define mozilla_ipc_ListenSocket_h
|
||||
|
||||
#include "nsString.h"
|
||||
#include "mozilla/ipc/SocketBase.h"
|
||||
#include "nsString.h"
|
||||
|
||||
class MessageLoop;
|
||||
|
||||
|
@ -90,4 +90,4 @@ private:
|
|||
} // namespace ipc
|
||||
} // namepsace mozilla
|
||||
|
||||
#endif // mozilla_ipc_listensocket_h
|
||||
#endif // mozilla_ipc_ListenSocket_h
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
@ -23,10 +24,14 @@ UnixSocketBuffer::UnixSocketBuffer()
|
|||
, mOffset(0)
|
||||
, mAvailableSpace(0)
|
||||
, mData(nullptr)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(UnixSocketBuffer);
|
||||
}
|
||||
|
||||
UnixSocketBuffer::~UnixSocketBuffer()
|
||||
{
|
||||
MOZ_COUNT_DTOR(UnixSocketBuffer);
|
||||
|
||||
// Make sure that the caller released the buffer's memory.
|
||||
MOZ_ASSERT(!GetBuffer());
|
||||
}
|
||||
|
@ -96,8 +101,15 @@ UnixSocketBuffer::CleanupLeadingSpace()
|
|||
// UnixSocketIOBuffer
|
||||
//
|
||||
|
||||
UnixSocketIOBuffer::UnixSocketIOBuffer()
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(UnixSocketIOBuffer, UnixSocketBuffer);
|
||||
}
|
||||
|
||||
UnixSocketIOBuffer::~UnixSocketIOBuffer()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(UnixSocketIOBuffer, UnixSocketBuffer);
|
||||
}
|
||||
|
||||
//
|
||||
// UnixSocketRawData
|
||||
|
@ -107,17 +119,23 @@ UnixSocketRawData::UnixSocketRawData(const void* aData, size_t aSize)
|
|||
{
|
||||
MOZ_ASSERT(aData || !aSize);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(UnixSocketRawData, UnixSocketIOBuffer);
|
||||
|
||||
ResetBuffer(static_cast<uint8_t*>(memcpy(new uint8_t[aSize], aData, aSize)),
|
||||
0, aSize, aSize);
|
||||
}
|
||||
|
||||
UnixSocketRawData::UnixSocketRawData(size_t aSize)
|
||||
{
|
||||
MOZ_COUNT_CTOR_INHERITED(UnixSocketRawData, UnixSocketIOBuffer);
|
||||
|
||||
ResetBuffer(new uint8_t[aSize], 0, 0, aSize);
|
||||
}
|
||||
|
||||
UnixSocketRawData::~UnixSocketRawData()
|
||||
{
|
||||
MOZ_COUNT_DTOR_INHERITED(UnixSocketRawData, UnixSocketIOBuffer);
|
||||
|
||||
nsAutoArrayPtr<uint8_t> data(GetBuffer());
|
||||
ResetBuffer(nullptr, 0, 0, 0);
|
||||
}
|
||||
|
@ -237,11 +255,15 @@ SocketBase::SocketBase()
|
|||
: mConnectionStatus(SOCKET_DISCONNECTED)
|
||||
, mConnectTimestamp(0)
|
||||
, mConnectDelayMs(0)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(SocketBase);
|
||||
}
|
||||
|
||||
SocketBase::~SocketBase()
|
||||
{
|
||||
MOZ_ASSERT(mConnectionStatus == SOCKET_DISCONNECTED);
|
||||
|
||||
MOZ_COUNT_DTOR(SocketBase);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -258,10 +280,14 @@ SocketIOBase::SocketIOBase(MessageLoop* aConsumerLoop)
|
|||
: mConsumerLoop(aConsumerLoop)
|
||||
{
|
||||
MOZ_ASSERT(mConsumerLoop);
|
||||
|
||||
MOZ_COUNT_CTOR(SocketIOBase);
|
||||
}
|
||||
|
||||
SocketIOBase::~SocketIOBase()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR(SocketIOBase);
|
||||
}
|
||||
|
||||
MessageLoop*
|
||||
SocketIOBase::GetConsumerThread() const
|
||||
|
@ -282,7 +308,14 @@ SocketIOBase::IsConsumerThread() const
|
|||
SocketEventTask::SocketEventTask(SocketIOBase* aIO, SocketEvent aEvent)
|
||||
: SocketTask<SocketIOBase>(aIO)
|
||||
, mEvent(aEvent)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(SocketEventTask);
|
||||
}
|
||||
|
||||
SocketEventTask::~SocketEventTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(SocketEventTask);
|
||||
}
|
||||
|
||||
void
|
||||
SocketEventTask::Run()
|
||||
|
@ -313,10 +346,16 @@ SocketEventTask::Run()
|
|||
// SocketRequestClosingTask
|
||||
//
|
||||
|
||||
SocketRequestClosingTask::SocketRequestClosingTask(
|
||||
SocketIOBase* aIO)
|
||||
SocketRequestClosingTask::SocketRequestClosingTask(SocketIOBase* aIO)
|
||||
: SocketTask<SocketIOBase>(aIO)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(SocketRequestClosingTask);
|
||||
}
|
||||
|
||||
SocketRequestClosingTask::~SocketRequestClosingTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(SocketRequestClosingTask);
|
||||
}
|
||||
|
||||
void
|
||||
SocketRequestClosingTask::Run()
|
||||
|
@ -341,10 +380,16 @@ SocketRequestClosingTask::Run()
|
|||
// SocketDeleteInstanceTask
|
||||
//
|
||||
|
||||
SocketDeleteInstanceTask::SocketDeleteInstanceTask(
|
||||
SocketIOBase* aIO)
|
||||
SocketDeleteInstanceTask::SocketDeleteInstanceTask(SocketIOBase* aIO)
|
||||
: mIO(aIO)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(SocketDeleteInstanceTask);
|
||||
}
|
||||
|
||||
SocketDeleteInstanceTask::~SocketDeleteInstanceTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(SocketDeleteInstanceTask);
|
||||
}
|
||||
|
||||
void
|
||||
SocketDeleteInstanceTask::Run()
|
||||
|
@ -358,7 +403,14 @@ SocketDeleteInstanceTask::Run()
|
|||
|
||||
SocketIOShutdownTask::SocketIOShutdownTask(SocketIOBase* aIO)
|
||||
: SocketIOTask<SocketIOBase>(aIO)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(SocketIOShutdownTask);
|
||||
}
|
||||
|
||||
SocketIOShutdownTask::~SocketIOShutdownTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(SocketIOShutdownTask);
|
||||
}
|
||||
|
||||
void
|
||||
SocketIOShutdownTask::Run()
|
||||
|
|
|
@ -197,6 +197,7 @@ private:
|
|||
class UnixSocketIOBuffer : public UnixSocketBuffer
|
||||
{
|
||||
public:
|
||||
UnixSocketIOBuffer();
|
||||
virtual ~UnixSocketIOBuffer();
|
||||
|
||||
/**
|
||||
|
@ -439,6 +440,7 @@ public:
|
|||
};
|
||||
|
||||
SocketEventTask(SocketIOBase* aIO, SocketEvent aEvent);
|
||||
~SocketEventTask();
|
||||
|
||||
void Run() override;
|
||||
|
||||
|
@ -454,6 +456,7 @@ class SocketRequestClosingTask final : public SocketTask<SocketIOBase>
|
|||
{
|
||||
public:
|
||||
SocketRequestClosingTask(SocketIOBase* aIO);
|
||||
~SocketRequestClosingTask();
|
||||
|
||||
void Run() override;
|
||||
};
|
||||
|
@ -465,6 +468,7 @@ class SocketDeleteInstanceTask final : public Task
|
|||
{
|
||||
public:
|
||||
SocketDeleteInstanceTask(SocketIOBase* aIO);
|
||||
~SocketDeleteInstanceTask();
|
||||
|
||||
void Run() override;
|
||||
|
||||
|
@ -520,6 +524,7 @@ class SocketIOShutdownTask final : public SocketIOTask<SocketIOBase>
|
|||
{
|
||||
public:
|
||||
SocketIOShutdownTask(SocketIOBase* aIO);
|
||||
~SocketIOShutdownTask();
|
||||
|
||||
void Run() override;
|
||||
};
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "StreamSocket.h"
|
||||
#include <fcntl.h>
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "StreamSocketConsumer.h"
|
||||
#include "UnixSocketConnector.h"
|
||||
|
@ -68,11 +69,11 @@ public:
|
|||
|
||||
private:
|
||||
/**
|
||||
* Consumer pointer. Non-thread safe RefPtr, so should only be manipulated
|
||||
* Consumer pointer. Non-thread-safe pointer, so should only be manipulated
|
||||
* directly from consumer thread. All non-consumer-thread accesses should
|
||||
* happen with mIO as container.
|
||||
*/
|
||||
RefPtr<StreamSocket> mStreamSocket;
|
||||
StreamSocket* mStreamSocket;
|
||||
|
||||
/**
|
||||
* If true, do not requeue whatever task we're running
|
||||
|
@ -101,6 +102,8 @@ StreamSocketIO::StreamSocketIO(MessageLoop* aConsumerLoop,
|
|||
, mDelayedConnectTask(nullptr)
|
||||
{
|
||||
MOZ_ASSERT(mStreamSocket);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(StreamSocketIO, ConnectionOrientedSocketIO);
|
||||
}
|
||||
|
||||
StreamSocketIO::StreamSocketIO(MessageLoop* aConsumerLoop,
|
||||
|
@ -118,24 +121,28 @@ StreamSocketIO::StreamSocketIO(MessageLoop* aConsumerLoop,
|
|||
, mDelayedConnectTask(nullptr)
|
||||
{
|
||||
MOZ_ASSERT(mStreamSocket);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(StreamSocketIO, ConnectionOrientedSocketIO);
|
||||
}
|
||||
|
||||
StreamSocketIO::~StreamSocketIO()
|
||||
{
|
||||
MOZ_ASSERT(IsConsumerThread());
|
||||
MOZ_ASSERT(IsShutdownOnConsumerThread());
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(StreamSocketIO, ConnectionOrientedSocketIO);
|
||||
}
|
||||
|
||||
StreamSocket*
|
||||
StreamSocketIO::GetStreamSocket()
|
||||
{
|
||||
return mStreamSocket.get();
|
||||
return mStreamSocket;
|
||||
}
|
||||
|
||||
DataSocket*
|
||||
StreamSocketIO::GetDataSocket()
|
||||
{
|
||||
return mStreamSocket.get();
|
||||
return GetStreamSocket();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -192,7 +199,14 @@ public:
|
|||
ReceiveTask(StreamSocketIO* aIO, UnixSocketBuffer* aBuffer)
|
||||
: SocketTask<StreamSocketIO>(aIO)
|
||||
, mBuffer(aBuffer)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(ReceiveTask);
|
||||
}
|
||||
|
||||
~ReceiveTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ReceiveTask);
|
||||
}
|
||||
|
||||
void Run() override
|
||||
{
|
||||
|
@ -274,13 +288,19 @@ StreamSocketIO::ShutdownOnIOThread()
|
|||
// Socket tasks
|
||||
//
|
||||
|
||||
class StreamSocketIO::ConnectTask final
|
||||
: public SocketIOTask<StreamSocketIO>
|
||||
class StreamSocketIO::ConnectTask final : public SocketIOTask<StreamSocketIO>
|
||||
{
|
||||
public:
|
||||
ConnectTask(StreamSocketIO* aIO)
|
||||
: SocketIOTask<StreamSocketIO>(aIO)
|
||||
{ }
|
||||
: SocketIOTask<StreamSocketIO>(aIO)
|
||||
{
|
||||
MOZ_COUNT_CTOR(ReceiveTask);
|
||||
}
|
||||
|
||||
~ConnectTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(ReceiveTask);
|
||||
}
|
||||
|
||||
void Run() override
|
||||
{
|
||||
|
@ -297,7 +317,14 @@ class StreamSocketIO::DelayedConnectTask final
|
|||
public:
|
||||
DelayedConnectTask(StreamSocketIO* aIO)
|
||||
: SocketIOTask<StreamSocketIO>(aIO)
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(DelayedConnectTask);
|
||||
}
|
||||
|
||||
~DelayedConnectTask()
|
||||
{
|
||||
MOZ_COUNT_DTOR(DelayedConnectTask);
|
||||
}
|
||||
|
||||
void Run() override
|
||||
{
|
||||
|
@ -327,11 +354,15 @@ StreamSocket::StreamSocket(StreamSocketConsumer* aConsumer, int aIndex)
|
|||
, mIndex(aIndex)
|
||||
{
|
||||
MOZ_ASSERT(mConsumer);
|
||||
|
||||
MOZ_COUNT_CTOR_INHERITED(StreamSocket, ConnectionOrientedSocket);
|
||||
}
|
||||
|
||||
StreamSocket::~StreamSocket()
|
||||
{
|
||||
MOZ_ASSERT(!mIO);
|
||||
|
||||
MOZ_COUNT_DTOR_INHERITED(StreamSocket, ConnectionOrientedSocket);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -5,15 +5,20 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "UnixSocketConnector.h"
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, MOZ_COUNT_DTOR
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
UnixSocketConnector::UnixSocketConnector()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_CTOR(UnixSocketConnector);
|
||||
}
|
||||
|
||||
UnixSocketConnector::~UnixSocketConnector()
|
||||
{ }
|
||||
{
|
||||
MOZ_COUNT_DTOR(UnixSocketConnector);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче