Merge mozilla-central to fx-team a=merge

This commit is contained in:
Wes Kocher 2015-01-08 17:17:13 -08:00
commit 1d86126a67
710 changed files with 12882 additions and 39920 deletions

View File

@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Bug 1066383 - Clobber needed due to build system not reliably picking up an IDL removal.
Bug 1056337 - Change default compiler for B2G ICS builds.

View File

@ -492,7 +492,6 @@ def run_app(harness_root_dir, manifest_rdf, harness_options,
env['MOZ_DISABLE_NONLOCAL_CONNECTIONS'] = '1'
env['MOZ_NO_REMOTE'] = '1'
env['XPCOM_DEBUG_BREAK'] = 'stack'
env['NS_TRACE_MALLOC_DISABLE_STACKS'] = '1'
env.update(extra_environment)
if norun:
cmdargs.append("-no-remote")

View File

@ -15,15 +15,15 @@
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<!-- 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"/>

View File

@ -19,16 +19,16 @@
<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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>
<project name="platform/bootable/recovery" path="bootable/recovery" revision="425f8b5fadf5889834c5acd27d23c9e0b2129c28"/>
<project name="device/common" path="device/common" revision="42b808b7e93d0619286ae8e59110b176b7732389"/>
<project name="device/sample" path="device/sample" revision="237bd668d0f114d801a8d6455ef5e02cc3577587"/>
@ -102,6 +102,7 @@
<project name="platform/external/iproute2" path="external/iproute2" revision="c66c5716d5335e450f7a7b71ccc6a604fb2f41d2"/>
<project 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="d2685281e2e54ca14d1df304867aa82c37b27162"/>
<project 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="627f9b20fc518937b93747a7ff1ed4f5ed46e06f"/>
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="d9735fc81434f2af2c44d86ca57740c673c8d9bc"/>
<project name="platform/prebuilts/tools" path="prebuilts/tools" revision="acba00cdb4596c6dcb61ed06f14cf4ec89623539"/>
<project name="platform_prebuilts_qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="02c32feb2fe97037be0ac4dace3a6a5025ac895d"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="4f46930827957afbce500a4a920755a218bf3155"/>

View File

@ -17,10 +17,10 @@
</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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -15,15 +15,15 @@
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<!-- 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"/>

View File

@ -19,16 +19,16 @@
<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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>
<project name="platform/bootable/recovery" path="bootable/recovery" revision="425f8b5fadf5889834c5acd27d23c9e0b2129c28"/>
<project name="device/common" path="device/common" revision="42b808b7e93d0619286ae8e59110b176b7732389"/>
<project name="device/sample" path="device/sample" revision="237bd668d0f114d801a8d6455ef5e02cc3577587"/>
@ -102,6 +102,7 @@
<project name="platform/external/iproute2" path="external/iproute2" revision="c66c5716d5335e450f7a7b71ccc6a604fb2f41d2"/>
<project 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="d2685281e2e54ca14d1df304867aa82c37b27162"/>
<project 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="627f9b20fc518937b93747a7ff1ed4f5ed46e06f"/>
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="d9735fc81434f2af2c44d86ca57740c673c8d9bc"/>
<project name="platform/prebuilts/tools" path="prebuilts/tools" revision="acba00cdb4596c6dcb61ed06f14cf4ec89623539"/>
<project name="platform_prebuilts_qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="02c32feb2fe97037be0ac4dace3a6a5025ac895d"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="4f46930827957afbce500a4a920755a218bf3155"/>

View File

@ -1,9 +1,9 @@
[
{
"size": 120750384,
"digest": "0e0a0b0dcca020e3283ce8deb33d0eed48fab16ef2fd919120bd7b5abba00713210be17f466d11bf77cca3c9e3b663805be61774476cc669f0a75736d901edfd",
"size": 135359412,
"digest": "45e677c9606cc4eec44ef4761df47ff431df1ffad17a5c6d21ce700a1c47f79e87a4aa9f30ae47ff060bd64f5b775d995780d88211f9a759ffa0d076beb4816b",
"algorithm": "sha512",
"filename": "backup-flame.tar.xz",
"comment": "v188-1"
"comment": "v18D"
}
]

View File

@ -15,15 +15,15 @@
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<!-- 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"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "1e09277b96630e97f2cfdf2b9e319e50b42dd4e6",
"revision": "85bbbd703dba85b58c5b9d5902bc784c9f763c1d",
"repo_path": "integration/gaia-central"
}

View File

@ -17,11 +17,11 @@
<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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>

View File

@ -15,8 +15,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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>

View File

@ -17,10 +17,10 @@
</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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -17,12 +17,12 @@
<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="d4dac29613076bdba3cb8adc217deadb08a2ac20"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="ce7b7cbc26a3e23e7dd72a17c0d0d755cb5d5423"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5f0dd37917c4a6d8fa8724715d4d3797419f9013"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cd63c7ae655ee08ffac32ce36a188f8fefc4b272"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="add5134fdd04ab2cc987923205f2150b3b6d8ae2"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef5d837b06c473b4e7139a6e13550cfd602aba88"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

View File

@ -59,6 +59,11 @@ MOZ_B2G=1
if test "$OS_TARGET" = "Android"; then
MOZ_NUWA_PROCESS=1
MOZ_B2G_LOADER=1
# Warnings-as-errors cannot be enabled on gcc <= 4.4 due to bug 915555.
if test "$GCC_MAJOR_VERSION" -gt 4 -o \
"$GCC_MAJOR_VERSION" -eq 4 -a "$GCC_MINOR_VERSION" -gt 4; then
MOZ_ENABLE_WARNINGS_AS_ERRORS=1
fi
fi
MOZ_JSDOWNLOADS=1

View File

@ -25,7 +25,7 @@
<command id="Browser:SavePage" oncommand="saveDocument(gBrowser.selectedBrowser.contentDocumentAsCPOW);"/>
<command id="Browser:SendLink"
oncommand="MailIntegration.sendLinkForWindow(window.content);"/>
oncommand="MailIntegration.sendLinkForBrowser(gBrowser.selectedBrowser);"/>
<command id="cmd_pageSetup" oncommand="PrintUtils.showPageSetup();"/>
<command id="cmd_print" oncommand="PrintUtils.print(window.gBrowser.selectedBrowser.contentWindowAsCPOW, window.gBrowser.selectedBrowser);"/>

View File

@ -1738,7 +1738,7 @@ function HandleAppCommandEvent(evt) {
saveDocument(gBrowser.selectedBrowser.contentDocumentAsCPOW);
break;
case "SendMail":
MailIntegration.sendLinkForWindow(window.content);
MailIntegration.sendLinkForBrowser(gBrowser.selectedBrowser);
break;
default:
return;
@ -6524,9 +6524,8 @@ function warnAboutClosingWindow() {
}
var MailIntegration = {
sendLinkForWindow: function (aWindow) {
this.sendMessage(aWindow.location.href,
aWindow.document.title);
sendLinkForBrowser: function (aBrowser) {
this.sendMessage(aBrowser.currentURI.spec, aBrowser.contentTitle);
},
sendMessage: function (aBody, aSubject) {

View File

@ -920,7 +920,7 @@ const CustomizableWidgets = [
tooltiptext: "email-link-button.tooltiptext3",
onCommand: function(aEvent) {
let win = aEvent.view;
win.MailIntegration.sendLinkForWindow(win.content);
win.MailIntegration.sendLinkForBrowser(win.gBrowser.selectedBrowser)
}
}, {
id: "loop-button",

View File

@ -147,6 +147,14 @@ endif
ifdef CLANG_CL
DEFINES += -DCLANG_CL
endif
ifeq (x86,$(CPU_ARCH))
ifdef _MSC_VER
ifndef CLANG_CL
DEFINES += -DWOW_HELPER
endif
endif
endif
libs::
$(MAKE) -C $(DEPTH)/browser/locales langpack

View File

@ -783,6 +783,9 @@
#if defined(MOZ_SANDBOX)
#if defined(XP_WIN)
@BINPATH@/@DLL_PREFIX@sandboxbroker@DLL_SUFFIX@
#if defined(WOW_HELPER)
@BINPATH@/wow_helper.exe
#endif
#endif
#endif

View File

@ -15,7 +15,7 @@ cat <<EOF > conftest.c
#if defined(__clang__)
COMPILER clang-cl _MSC_VER
#else
COMPILER msvc _MSC_VER
COMPILER msvc _MSC_FULL_VER
#endif
#elif defined(__clang__)
COMPILER clang __clang_major__.__clang_minor__.__clang_patchlevel__
@ -55,6 +55,13 @@ rm -f conftest.out
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
GNU_LD=1
fi
if test "$compiler" = "msvc"; then
MSVC_VERSION_FULL="$CXX_VERSION"
CC_VERSION=`echo ${CC_VERSION} | cut -c 1-4`
CXX_VERSION=`echo ${CXX_VERSION} | cut -c 1-4`
fi
INTEL_CC=
INTEL_CXX=
if test "$compiler" = "icc"; then
@ -78,9 +85,10 @@ if test "$compiler" = "clang-cl"; then
# getting the right version here manually.
CC_VERSION=1800
CXX_VERSION=1800
# Build on clang-cl with MSVC 2013 with fallback emulation.
CFLAGS="$CFLAGS -fmsc-version=1800 -fallback"
CXXFLAGS="$CXXFLAGS -fmsc-version=1800 -fallback"
MSVC_VERSION_FULL=180030723
# Build on clang-cl with MSVC 2013 Update 3 with fallback emulation.
CFLAGS="$CFLAGS -fms-compatibility-version=18.00.30723 -fallback"
CXXFLAGS="$CXXFLAGS -fms-compatibility-version=18.00.30723 -fallback"
fi
if test "$GNU_CC"; then

View File

@ -504,7 +504,6 @@ class Automation(object):
env['GNOME_DISABLE_CRASH_DIALOG'] = '1'
env['XRE_NO_WINDOWS_CRASH_DIALOG'] = '1'
env['NS_TRACE_MALLOC_DISABLE_STACKS'] = '1'
# Set WebRTC logging in case it is not set yet
env.setdefault('NSPR_LOG_MODULES', 'signaling:5,mtransport:5,datachannel:5,jsep:5,MediaPipelineFactory:5')

View File

@ -330,7 +330,6 @@ def environment(xrePath, env=None, crashreporter=True, debugger=False, dmdPath=N
# crashreporter
env['GNOME_DISABLE_CRASH_DIALOG'] = '1'
env['XRE_NO_WINDOWS_CRASH_DIALOG'] = '1'
env['NS_TRACE_MALLOC_DISABLE_STACKS'] = '1'
if crashreporter and not debugger:
env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'

View File

@ -7,3 +7,6 @@ The overrides/ directory contains Mozilla-specific overrides to the standard
The following patches are applied on top:
- android-mozilla-config.patch: Adjusts Android-specific configuration
to the mozilla codebase use of the STL.
- fix-warnings-as-errors.patch: Fixes warnings which were causing the
B2G emulator-ICS build to fail (related to bug 1073003).

View File

@ -0,0 +1,70 @@
# HG changeset patch
# Parent f89b28ea7c7b7fcb54c34e74fcb047626300bfba
# User Dave Hylands <dhylands@mozilla.com>
Bug 1073003 - Fix warnings in stlport causing errors in emulator build.
diff --git a/build/stlport/stlport/stl/_istream.c b/build/stlport/stlport/stl/_istream.c
--- a/build/stlport/stlport/stl/_istream.c
+++ b/build/stlport/stlport/stl/_istream.c
@@ -1140,17 +1140,16 @@ basic_istream<_CharT, _Traits>::ignore(s
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __delim) {
sentry __sentry(*this, _No_Skip_WS());
this->_M_gcount = 0;
if (__sentry) {
basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
- typedef _STLP_PRIV _Constant_unary_fun<bool, int_type> _Const_bool;
typedef _STLP_PRIV _Constant_binary_fun<streamsize, streamsize, streamsize>
_Const_streamsize;
const streamsize __maxss = (numeric_limits<streamsize>::max)();
if (__n == (numeric_limits<int>::max)()) {
if (__buf->gptr() != __buf->egptr())
_M_gcount = _M_ignore_buffered(this, __buf,
__maxss, _Const_streamsize(__maxss),
diff --git a/build/stlport/stlport/stl/_slist.c b/build/stlport/stlport/stl/_slist.c
--- a/build/stlport/stlport/stl/_slist.c
+++ b/build/stlport/stlport/stl/_slist.c
@@ -143,17 +143,16 @@ void _Slist_unique(slist<_Tp, _Alloc>& _
}
}
}
template <class _Tp, class _Alloc, class _StrictWeakOrdering>
void _Slist_merge(slist<_Tp, _Alloc>& __that, slist<_Tp, _Alloc>& __x,
_StrictWeakOrdering __comp) {
typedef _Slist_node<_Tp> _Node;
- typedef _STLP_PRIV _Slist_node_base _Node_base;
if (__that.get_allocator() == __x.get_allocator()) {
typename slist<_Tp, _Alloc>::iterator __ite(__that.before_begin());
while (__ite._M_node->_M_next && !__x.empty()) {
if (__comp(__x.front(), __STATIC_CAST(_Node*, __ite._M_node->_M_next)->_M_data)) {
_STLP_VERBOSE_ASSERT(!__comp(__STATIC_CAST(_Node*, __ite._M_node->_M_next)->_M_data, __x.front()),
_StlMsg_INVALID_STRICT_WEAK_PREDICATE)
__that.splice_after(__ite, __x, __x.before_begin());
}
diff --git a/build/stlport/stlport/stl/config/features.h b/build/stlport/stlport/stl/config/features.h
--- a/build/stlport/stlport/stl/config/features.h
+++ b/build/stlport/stlport/stl/config/features.h
@@ -303,17 +303,18 @@
# undef _STLP_NO_DEFAULT_NON_TYPE_PARAM
# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
#endif
#if !defined (_STLP_STATIC_ASSERT)
/* Some compiler support 0 size array so we use negative size array to generate
* a compilation time error.
*/
-# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
+//# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
+# define _STLP_STATIC_ASSERT(expr) static_assert(expr, "static_assert failed");
#endif
/* apple mpw exception handling bug */
#ifndef _STLP_MPWFIX_TRY
# define _STLP_MPWFIX_TRY
#endif
#ifndef _STLP_MPWFIX_CATCH
# define _STLP_MPWFIX_CATCH

View File

@ -9,9 +9,6 @@ Library('stlport')
# name for the Library for convenience in moz.build.
STATIC_LIBRARY_NAME = 'stlport_static'
if not CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
OS_LIBS += ['-static-libstdc++']
FORCE_STATIC_LIB = True
SOURCES += [

View File

@ -1145,7 +1145,6 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __delim) {
if (__sentry) {
basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
typedef _STLP_PRIV _Constant_unary_fun<bool, int_type> _Const_bool;
typedef _STLP_PRIV _Constant_binary_fun<streamsize, streamsize, streamsize>
_Const_streamsize;
const streamsize __maxss = (numeric_limits<streamsize>::max)();

View File

@ -148,7 +148,6 @@ template <class _Tp, class _Alloc, class _StrictWeakOrdering>
void _Slist_merge(slist<_Tp, _Alloc>& __that, slist<_Tp, _Alloc>& __x,
_StrictWeakOrdering __comp) {
typedef _Slist_node<_Tp> _Node;
typedef _STLP_PRIV _Slist_node_base _Node_base;
if (__that.get_allocator() == __x.get_allocator()) {
typename slist<_Tp, _Alloc>::iterator __ite(__that.before_begin());
while (__ite._M_node->_M_next && !__x.empty()) {

View File

@ -308,7 +308,8 @@
/* Some compiler support 0 size array so we use negative size array to generate
* a compilation time error.
*/
# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
//# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
# define _STLP_STATIC_ASSERT(expr) static_assert(expr, "static_assert failed");
#endif
/* apple mpw exception handling bug */

View File

@ -228,17 +228,17 @@ endif
endif
#
# Handle trace-malloc and DMD in optimized builds.
# Handle DMD in optimized builds.
# No opt to give sane callstacks.
#
ifneq (,$(NS_TRACE_MALLOC)$(MOZ_DMD))
ifdef MOZ_DMD
MOZ_OPTIMIZE_FLAGS=-Zi -Od -UDEBUG -DNDEBUG
ifdef HAVE_64BIT_BUILD
OS_LDFLAGS = -DEBUG -OPT:REF,ICF
else
OS_LDFLAGS = -DEBUG -OPT:REF
endif
endif # NS_TRACE_MALLOC || MOZ_DMD
endif # MOZ_DMD
endif # MOZ_DEBUG
@ -421,20 +421,20 @@ ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
#//------------------------------------------------------------------------
ifdef USE_STATIC_LIBS
RTL_FLAGS=-MT # Statically linked multithreaded RTL
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
ifdef MOZ_DEBUG
ifndef MOZ_NO_DEBUG_RTL
RTL_FLAGS=-MTd # Statically linked multithreaded MSVC4.0 debug RTL
endif
endif # MOZ_DEBUG || NS_TRACE_MALLOC
endif # MOZ_DEBUG
else # !USE_STATIC_LIBS
RTL_FLAGS=-MD # Dynamically linked, multithreaded RTL
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
ifdef MOZ_DEBUG
ifndef MOZ_NO_DEBUG_RTL
RTL_FLAGS=-MDd # Dynamically linked, multithreaded MSVC4.0 debug RTL
endif
endif # MOZ_DEBUG || NS_TRACE_MALLOC
endif # MOZ_DEBUG
endif # USE_STATIC_LIBS
endif # WINNT && !GNU_CC

View File

@ -471,8 +471,9 @@ case "$target" in
changequote([,])
# Determine compiler version
_CC_MAJOR_VERSION=`echo ${CC_VERSION} | cut -c 1-2`
_CC_MINOR_VERSION=`echo ${CC_VERSION} | cut -c 3-4`
_CC_MAJOR_VERSION=`echo ${MSVC_VERSION_FULL} | cut -c 1-2`
_CC_MINOR_VERSION=`echo ${MSVC_VERSION_FULL} | cut -c 3-4`
_CC_BUILD_VERSION=`echo ${MSVC_VERSION_FULL} | cut -c 5-`
_MSC_VER=${CC_VERSION}
_CXX_MAJOR_VERSION=`echo ${CXX_VERSION} | cut -c 1-2`
@ -484,13 +485,15 @@ case "$target" in
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
if test "$_CC_MAJOR_VERSION" = "18"; then
if test "$_CC_MAJOR_VERSION" = "18" -a "$_CC_BUILD_VERSION" -ge "30723"; then
_CC_SUITE=12
MSVS_VERSION=2013
MSVC_C_RUNTIME_DLL=msvcr120.dll
MSVC_CXX_RUNTIME_DLL=msvcp120.dll
else
AC_MSG_ERROR([This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
AC_MSG_ERROR([This version (${_CC_MAJOR_VERSION}.${_CC_MINOR_VERSION}.${_CC_BUILD_VERSION}) of the MSVC compiler is unsupported.
You must install Visual C++ 2013 Update 3 or newer in order to build.
See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
fi
AC_SUBST(MSVS_VERSION)
AC_SUBST(MSVC_C_RUNTIME_DLL)
@ -7046,21 +7049,6 @@ if test -n "$MOZ_DEBUG"; then
AC_DEFINE(MOZ_DUMP_PAINTING)
fi
dnl ========================================================
dnl = Enable trace malloc
dnl ========================================================
NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
MOZ_ARG_ENABLE_BOOL(trace-malloc,
[ --enable-trace-malloc Enable malloc tracing; also disables DMD and jemalloc],
NS_TRACE_MALLOC=1,
NS_TRACE_MALLOC= )
if test "$NS_TRACE_MALLOC"; then
# Please, Mr. Linker Man, don't take away our symbol names
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
AC_DEFINE(NS_TRACE_MALLOC)
fi
AC_SUBST(NS_TRACE_MALLOC)
dnl ========================================================
dnl = Enable DMD
dnl ========================================================
@ -7070,11 +7058,6 @@ MOZ_ARG_ENABLE_BOOL(dmd,
MOZ_DMD=1,
MOZ_DMD= )
dnl The two options are conflicting. Fails the configure to alert the user.
if test "$NS_TRACE_MALLOC" -a "$MOZ_DMD"; then
AC_MSG_ERROR([--enable-trace-malloc and --enable-dmd are conflicting options])
fi
if test "$MOZ_DMD"; then
AC_DEFINE(MOZ_DMD)
@ -7096,10 +7079,6 @@ MOZ_ARG_ENABLE_BOOL(jemalloc,
MOZ_MEMORY=1,
MOZ_MEMORY=)
if test "$NS_TRACE_MALLOC"; then
MOZ_MEMORY=
fi
case "${OS_TARGET}" in
Android|WINNT|Darwin)
MOZ_GLUE_IN_PROGRAM=
@ -7122,11 +7101,6 @@ MOZ_ARG_ENABLE_BOOL(replace-malloc,
MOZ_REPLACE_MALLOC=1,
MOZ_REPLACE_MALLOC= )
dnl The two options are conflicting. Fails the configure to alert the user.
if test "$NS_TRACE_MALLOC" -a "$MOZ_REPLACE_MALLOC"; then
AC_MSG_ERROR([--enable-trace-malloc and --enable-replace-malloc are conflicting options])
fi
if test -n "$MOZ_REPLACE_MALLOC" -a -z "$MOZ_MEMORY"; then
dnl We don't want to enable jemalloc unconditionally because it may be a
dnl deliberate choice not to enable it (bug 702250, for instance)
@ -7601,9 +7575,9 @@ if test -z "$SKIP_LIBRARY_CHECKS"; then
AC_LANG_RESTORE
fi
# Demangle only for debug or trace-malloc or DMD builds
# Demangle only for debug or DMD builds
MOZ_DEMANGLE_SYMBOLS=
if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC" -o "$MOZ_DMD"; then
if test "$HAVE_DEMANGLE" && test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
MOZ_DEMANGLE_SYMBOLS=1
AC_DEFINE(MOZ_DEMANGLE_SYMBOLS)
fi
@ -8423,7 +8397,7 @@ if test -n "$MOZ_DEVICES"; then
fi
dnl ========================================================
if test "$MOZ_DEBUG" -o "$NS_TRACE_MALLOC" -o "$MOZ_DMD"; then
if test "$MOZ_DEBUG" -o "$MOZ_DMD"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
fi

View File

@ -28,6 +28,8 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
, mSecurityFlags(aSecurityFlags)
, mContentPolicyType(aContentPolicyType)
, mBaseURI(aBaseURI)
, mInnerWindowID(aLoadingContext ?
aLoadingContext->OwnerDoc()->InnerWindowID() : 0)
{
MOZ_ASSERT(mLoadingPrincipal);
MOZ_ASSERT(mTriggeringPrincipal);
@ -43,6 +45,21 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
}
}
LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
nsIPrincipal* aTriggeringPrincipal,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
uint32_t aInnerWindowID)
: mLoadingPrincipal(aLoadingPrincipal)
, mTriggeringPrincipal(aTriggeringPrincipal)
, mSecurityFlags(aSecurityFlags)
, mContentPolicyType(aContentPolicyType)
, mInnerWindowID(aInnerWindowID)
{
MOZ_ASSERT(mLoadingPrincipal);
MOZ_ASSERT(mTriggeringPrincipal);
}
LoadInfo::~LoadInfo()
{
}
@ -135,4 +152,11 @@ LoadInfo::BaseURI()
return mBaseURI;
}
NS_IMETHODIMP
LoadInfo::GetInnerWindowID(uint32_t* outInnerWindowID)
{
*outInnerWindowID = mInnerWindowID;
return NS_OK;
}
} // namespace mozilla

View File

@ -17,6 +17,11 @@ class nsINode;
namespace mozilla {
namespace net {
class HttpChannelParent;
class FTPChannelParent;
}
/**
* Class that provides an nsILoadInfo implementation.
*/
@ -35,6 +40,18 @@ public:
nsIURI* aBaseURI = nullptr);
private:
// private constructor that is only allowed to be called from within
// HttpChannelParent and FTPChannelParent declared as friends undeneath.
// In e10s we can not serialize nsINode, hence we store the innerWindowID.
LoadInfo(nsIPrincipal* aLoadingPrincipal,
nsIPrincipal* aTriggeringPrincipal,
nsSecurityFlags aSecurityFlags,
nsContentPolicyType aContentPolicyType,
uint32_t aInnerWindowID);
friend class net::HttpChannelParent;
friend class net::FTPChannelParent;
~LoadInfo();
nsCOMPtr<nsIPrincipal> mLoadingPrincipal;
@ -43,6 +60,7 @@ private:
nsSecurityFlags mSecurityFlags;
nsContentPolicyType mContentPolicyType;
nsCOMPtr<nsIURI> mBaseURI;
uint32_t mInnerWindowID;
};
} // namespace mozilla

View File

@ -180,4 +180,24 @@ interface nsILoadInfo : nsISupports
*/
[noscript, notxpcom, nostdcall, binaryname(BaseURI)]
nsIURI binaryBaseURI();
/**
* The innerWindowId of the loadingDocument, used to identify
* the loadingDocument in e10s where the loadingDocument is
* not available.
*
* Warning: If the loadingDocument is null, then the
* innerWindowId is 0.
*/
readonly attribute unsigned long innerWindowID;
%{ C++
inline uint32_t GetInnerWindowID()
{
uint32_t result;
mozilla::DebugOnly<nsresult> rv = GetInnerWindowID(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
%}
};

View File

@ -34,10 +34,10 @@ public:
static already_AddRefed<AlarmHalService> GetInstance();
// Implementing hal::AlarmObserver
void Notify(const void_t& aVoid);
void Notify(const void_t& aVoid) MOZ_OVERRIDE;
// Implementing hal::SystemTimezoneChangeObserver
void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo);
void Notify(const hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) MOZ_OVERRIDE;
private:
virtual ~AlarmHalService();

View File

@ -230,9 +230,7 @@ NS_GetContentList(nsINode* aRootNode,
// A PL_DHASH_ADD is equivalent to a PL_DHASH_LOOKUP for cases
// when the entry is already in the hashtable.
entry = static_cast<ContentListHashEntry *>
(PL_DHashTableOperate(&gContentListHashTable,
&hashKey,
PL_DHASH_ADD));
(PL_DHashTableAdd(&gContentListHashTable, &hashKey));
if (entry)
list = entry->mContentList;
}
@ -346,9 +344,8 @@ GetFuncStringContentList(nsINode* aRootNode,
// A PL_DHASH_ADD is equivalent to a PL_DHASH_LOOKUP for cases
// when the entry is already in the hashtable.
entry = static_cast<FuncStringContentListHashEntry *>
(PL_DHashTableOperate(&gFuncStringContentListHashTable,
&hashKey,
PL_DHASH_ADD));
(PL_DHashTableAdd(&gFuncStringContentListHashTable,
&hashKey));
if (entry) {
list = entry->mContentList;
#ifdef DEBUG
@ -989,9 +986,7 @@ nsContentList::RemoveFromHashtable()
if (!gContentListHashTable.ops)
return;
PL_DHashTableOperate(&gContentListHashTable,
&key,
PL_DHASH_REMOVE);
PL_DHashTableRemove(&gContentListHashTable, &key);
if (gContentListHashTable.EntryCount() == 0) {
PL_DHashTableFinish(&gContentListHashTable);
@ -1032,9 +1027,7 @@ nsCacheableFuncStringContentList::RemoveFromFuncStringHashtable()
}
nsFuncStringCacheKey key(mRootNode, mFunc, mString);
PL_DHashTableOperate(&gFuncStringContentListHashTable,
&key,
PL_DHASH_REMOVE);
PL_DHashTableRemove(&gFuncStringContentListHashTable, &key);
if (gFuncStringContentListHashTable.EntryCount() == 0) {
PL_DHashTableFinish(&gFuncStringContentListHashTable);

View File

@ -3954,8 +3954,7 @@ nsContentUtils::TraverseListenerManager(nsINode *aNode,
EventListenerManagerMapEntry *entry =
static_cast<EventListenerManagerMapEntry *>
(PL_DHashTableOperate(&sEventListenerManagersHash, aNode,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&sEventListenerManagersHash, aNode));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
CycleCollectionNoteChild(cb, entry->mListenerManager.get(),
"[via hash] mListenerManager");
@ -3974,8 +3973,7 @@ nsContentUtils::GetListenerManagerForNode(nsINode *aNode)
EventListenerManagerMapEntry *entry =
static_cast<EventListenerManagerMapEntry *>
(PL_DHashTableOperate(&sEventListenerManagersHash, aNode,
PL_DHASH_ADD));
(PL_DHashTableAdd(&sEventListenerManagersHash, aNode));
if (!entry) {
return nullptr;
@ -4006,8 +4004,7 @@ nsContentUtils::GetExistingListenerManagerForNode(const nsINode *aNode)
EventListenerManagerMapEntry *entry =
static_cast<EventListenerManagerMapEntry *>
(PL_DHashTableOperate(&sEventListenerManagersHash, aNode,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&sEventListenerManagersHash, aNode));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
return entry->mListenerManager;
}
@ -4022,8 +4019,7 @@ nsContentUtils::RemoveListenerManager(nsINode *aNode)
if (sEventListenerManagersHash.ops) {
EventListenerManagerMapEntry *entry =
static_cast<EventListenerManagerMapEntry *>
(PL_DHashTableOperate(&sEventListenerManagersHash, aNode,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&sEventListenerManagersHash, aNode));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
nsRefPtr<EventListenerManager> listenerManager;
listenerManager.swap(entry->mListenerManager);

View File

@ -3282,6 +3282,15 @@ nsDocument::GetUndoManager()
return undoManager.forget();
}
bool
nsDocument::IsWebAnimationsEnabled(JSContext* /*unused*/, JSObject* /*unused*/)
{
MOZ_ASSERT(NS_IsMainThread());
return nsContentUtils::IsCallerChrome() ||
Preferences::GetBool("dom.animations-api.core.enabled");
}
AnimationTimeline*
nsDocument::Timeline()
{
@ -3951,8 +3960,7 @@ nsDocument::SetSubDocumentFor(Element* aElement, nsIDocument* aSubDoc)
if (mSubDocuments) {
SubDocMapEntry *entry =
static_cast<SubDocMapEntry*>
(PL_DHashTableOperate(mSubDocuments, aElement,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(mSubDocuments, aElement));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
PL_DHashTableRawRemove(mSubDocuments, entry);
@ -3984,8 +3992,7 @@ nsDocument::SetSubDocumentFor(Element* aElement, nsIDocument* aSubDoc)
// Add a mapping to the hash table
SubDocMapEntry *entry =
static_cast<SubDocMapEntry*>
(PL_DHashTableOperate(mSubDocuments, aElement,
PL_DHASH_ADD));
(PL_DHashTableAdd(mSubDocuments, aElement));
if (!entry) {
return NS_ERROR_OUT_OF_MEMORY;
@ -4013,8 +4020,7 @@ nsDocument::GetSubDocumentFor(nsIContent *aContent) const
if (mSubDocuments && aContent->IsElement()) {
SubDocMapEntry *entry =
static_cast<SubDocMapEntry*>
(PL_DHashTableOperate(mSubDocuments, aContent->AsElement(),
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(mSubDocuments, aContent->AsElement()));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
return entry->mSubDocument;

View File

@ -782,6 +782,7 @@ public:
virtual already_AddRefed<mozilla::dom::UndoManager> GetUndoManager() MOZ_OVERRIDE;
static bool IsWebAnimationsEnabled(JSContext* aCx, JSObject* aObject);
virtual mozilla::dom::AnimationTimeline* Timeline() MOZ_OVERRIDE;
virtual nsresult SetSubDocumentFor(Element* aContent,

View File

@ -33,7 +33,13 @@ interface nsIContentPolicy : nsISupports
const nsContentPolicyType TYPE_INVALID = 0;
/**
* Gecko/Firefox developers: Do not use TYPE_OTHER under any circumstances.
* Gecko/Firefox developers: Avoid using TYPE_OTHER. Especially for
* requests that are coming from webpages. Or requests in general which
* you expect that security checks will be done on.
* Always use a more specific type if one is available. And do not hesitate
* to add more types as appropriate.
* But if you are fairly sure that no one would care about your more specific
* type, then it's ok to use TYPE_OTHER.
*
* Extension developers: Whenever it is reasonable, use one of the existing
* content types. If none of the existing content types are right for

View File

@ -8,6 +8,7 @@
interface nsIChannel;
interface nsIDOMDocument;
interface nsIDOMEventListener;
interface nsILoadGroup;
interface nsIPrincipal;
interface nsIScriptContext;
interface nsIURI;
@ -67,7 +68,7 @@ interface nsIXMLHttpRequestUpload : nsIXMLHttpRequestEventTarget {
* you're aware of all the security implications. And then think twice about
* it.
*/
[scriptable, uuid(2e91e088-e9fa-4ba4-9887-2a0b7cf27a3e)]
[scriptable, uuid(704e91dc-a3f6-4e4d-9f5f-4bb85159aeb7)]
interface nsIXMLHttpRequest : nsISupports
{
/**
@ -295,11 +296,15 @@ interface nsIXMLHttpRequest : nsISupports
* document.
* @param baseURI The base URI to use when resolving relative URIs. May be
* null.
* @param loadGroup An optional load group to use when performing the request.
* This will be used even if the global has a window with a
* load group.
*/
[noscript] void init(in nsIPrincipal principal,
in nsIScriptContext scriptContext,
in nsIGlobalObject globalObject,
in nsIURI baseURI);
in nsIURI baseURI,
[optional] in nsILoadGroup loadGroup);
/**
* Upload process can be tracked by adding event listener to |upload|.

View File

@ -185,7 +185,6 @@ static uint32_t sForgetSkippableBeforeCC = 0;
static uint32_t sPreviousSuspectedCount = 0;
static uint32_t sCleanupsSinceLastGC = UINT32_MAX;
static bool sNeedsFullCC = false;
static bool sNeedsFullGC = false;
static bool sNeedsGCAfterCC = false;
static bool sIncrementalCC = false;
static bool sDidPaintAfterPreviousICCSlice = false;
@ -1087,177 +1086,6 @@ nsJSContext::AddSupportsPrimitiveTojsvals(nsISupports *aArg, JS::Value *aArgv)
return NS_OK;
}
#ifdef NS_TRACE_MALLOC
#include <errno.h> // XXX assume Linux if NS_TRACE_MALLOC
#include <fcntl.h>
#ifdef XP_UNIX
#include <unistd.h>
#endif
#ifdef XP_WIN32
#include <io.h>
#endif
#include "nsTraceMalloc.h"
static bool
CheckUniversalXPConnectForTraceMalloc(JSContext *cx)
{
if (nsContentUtils::IsCallerChrome())
return true;
JS_ReportError(cx, "trace-malloc functions require UniversalXPConnect");
return false;
}
static bool
TraceMallocDisable(JSContext *cx, unsigned argc, JS::Value *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (!CheckUniversalXPConnectForTraceMalloc(cx))
return false;
NS_TraceMallocDisable();
args.rval().setUndefined();
return true;
}
static bool
TraceMallocEnable(JSContext *cx, unsigned argc, JS::Value *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (!CheckUniversalXPConnectForTraceMalloc(cx))
return false;
NS_TraceMallocEnable();
args.rval().setUndefined();
return true;
}
static bool
TraceMallocOpenLogFile(JSContext *cx, unsigned argc, JS::Value *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (!CheckUniversalXPConnectForTraceMalloc(cx))
return false;
int fd;
if (argc == 0) {
fd = -1;
} else {
JSString *str = JS::ToString(cx, args[0]);
if (!str)
return false;
JSAutoByteString filename(cx, str);
if (!filename)
return false;
fd = open(filename.ptr(), O_CREAT | O_WRONLY | O_TRUNC, 0644);
if (fd < 0) {
JS_ReportError(cx, "can't open %s: %s", filename.ptr(), strerror(errno));
return false;
}
}
args.rval().setInt32(fd);
return true;
}
static bool
TraceMallocChangeLogFD(JSContext *cx, unsigned argc, JS::Value *vp)
{
JS::CallArgs args = CallArgsFromVp(argc, vp);
if (!CheckUniversalXPConnectForTraceMalloc(cx))
return false;
int32_t fd, oldfd;
if (args.length() == 0) {
oldfd = -1;
} else {
if (!JS::ToInt32(cx, args[0], &fd))
return false;
oldfd = NS_TraceMallocChangeLogFD(fd);
if (oldfd == -2) {
JS_ReportOutOfMemory(cx);
return false;
}
}
args.rval().setInt32(oldfd);
return true;
}
static bool
TraceMallocCloseLogFD(JSContext *cx, unsigned argc, JS::Value *vp)
{
JS::CallArgs args = CallArgsFromVp(argc, vp);
if (!CheckUniversalXPConnectForTraceMalloc(cx))
return false;
int32_t fd;
if (args.length() == 0) {
args.rval().setUndefined();
return true;
}
if (!JS::ToInt32(cx, args[0], &fd))
return false;
NS_TraceMallocCloseLogFD((int) fd);
args.rval().setInt32(fd);
return true;
}
static bool
TraceMallocLogTimestamp(JSContext *cx, unsigned argc, JS::Value *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (!CheckUniversalXPConnectForTraceMalloc(cx))
return false;
JSString *str = JS::ToString(cx, args.get(0));
if (!str)
return false;
JSAutoByteString caption(cx, str);
if (!caption)
return false;
NS_TraceMallocLogTimestamp(caption.ptr());
args.rval().setUndefined();
return true;
}
static bool
TraceMallocDumpAllocations(JSContext *cx, unsigned argc, JS::Value *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
if (!CheckUniversalXPConnectForTraceMalloc(cx))
return false;
JSString *str = JS::ToString(cx, args.get(0));
if (!str)
return false;
JSAutoByteString pathname(cx, str);
if (!pathname)
return false;
if (NS_TraceMallocDumpAllocations(pathname.ptr()) < 0) {
JS_ReportError(cx, "can't dump to %s: %s", pathname.ptr(), strerror(errno));
return false;
}
args.rval().setUndefined();
return true;
}
static const JSFunctionSpec TraceMallocFunctions[] = {
JS_FS("TraceMallocDisable", TraceMallocDisable, 0, 0),
JS_FS("TraceMallocEnable", TraceMallocEnable, 0, 0),
JS_FS("TraceMallocOpenLogFile", TraceMallocOpenLogFile, 1, 0),
JS_FS("TraceMallocChangeLogFD", TraceMallocChangeLogFD, 1, 0),
JS_FS("TraceMallocCloseLogFD", TraceMallocCloseLogFD, 1, 0),
JS_FS("TraceMallocLogTimestamp", TraceMallocLogTimestamp, 1, 0),
JS_FS("TraceMallocDumpAllocations", TraceMallocDumpAllocations, 1, 0),
JS_FS_END
};
#endif /* NS_TRACE_MALLOC */
#ifdef MOZ_JPROF
#include <signal.h>
@ -1374,13 +1202,6 @@ nsJSContext::InitClasses(JS::Handle<JSObject*> aGlobalObj)
// Attempt to initialize profiling functions
::JS_DefineProfilingFunctions(cx, aGlobalObj);
#ifdef NS_TRACE_MALLOC
if (nsContentUtils::IsCallerChrome()) {
// Attempt to initialize TraceMalloc functions
::JS_DefineFunctions(cx, aGlobalObj, TraceMallocFunctions);
}
#endif
#ifdef MOZ_JPROF
// Attempt to initialize JProf functions
::JS_DefineFunctions(cx, aGlobalObj, JProfFunctions);
@ -1459,24 +1280,17 @@ nsJSContext::GarbageCollectNow(JS::gcreason::Reason aReason,
if (sCCLockedOut && aIncremental == IncrementalGC) {
// We're in the middle of incremental GC. Do another slice.
JS::PrepareForIncrementalGC(sRuntime);
JS::IncrementalGC(sRuntime, aReason, aSliceMillis);
JS::IncrementalGCSlice(sRuntime, aReason, aSliceMillis);
return;
}
if (sNeedsFullGC || aReason != JS::gcreason::CC_WAITING) {
sNeedsFullGC = false;
JS::PrepareForFullGC(sRuntime);
} else {
CycleCollectedJSRuntime::Get()->PrepareWaitingZonesForGC();
}
JS::PrepareForFullGC(sRuntime);
if (aIncremental == IncrementalGC) {
MOZ_ASSERT(aShrinking == NonShrinkingGC);
JS::IncrementalGC(sRuntime, aReason, aSliceMillis);
} else if (aShrinking == ShrinkingGC) {
JS::ShrinkingGC(sRuntime, aReason);
JS::StartIncrementalGC(sRuntime, GC_NORMAL, aReason, aSliceMillis);
} else {
JS::GCForReason(sRuntime, aReason);
JSGCInvocationKind gckind = aShrinking == ShrinkingGC ? GC_SHRINK : GC_NORMAL;
JS::GCForReason(sRuntime, gckind, aReason);
}
}
@ -2156,8 +1970,6 @@ nsJSContext::RunNextCollectorTimer()
void
nsJSContext::PokeGC(JS::gcreason::Reason aReason, int aDelay)
{
sNeedsFullGC = sNeedsFullGC || aReason != JS::gcreason::CC_WAITING;
if (sGCTimer || sInterSliceGCTimer || sShuttingDown) {
// There's already a timer for GC'ing, just return
return;
@ -2479,7 +2291,6 @@ mozilla::dom::StartupJSEnvironment()
sLikelyShortLivingObjectsNeedingGC = 0;
sPostGCEventsToConsole = false;
sNeedsFullCC = false;
sNeedsFullGC = false;
sNeedsGCAfterCC = false;
gNameSpaceManager = nullptr;
sRuntimeService = nullptr;

View File

@ -95,8 +95,7 @@ nsPropertyTable::TransferOrDeleteAllPropertiesFor(nsPropertyOwner aObject,
for (PropertyList* prop = mPropertyList; prop; prop = prop->mNext) {
if (prop->mTransfer) {
PropertyListMapEntry *entry = static_cast<PropertyListMapEntry*>
(PL_DHashTableOperate(&prop->mObjectValueMap, aObject,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&prop->mObjectValueMap, aObject));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
rv = aOtherTable->SetProperty(aObject, prop->mName,
entry->value, prop->mDtorFunc,
@ -126,7 +125,7 @@ nsPropertyTable::Enumerate(nsPropertyOwner aObject,
PropertyList* prop;
for (prop = mPropertyList; prop; prop = prop->mNext) {
PropertyListMapEntry *entry = static_cast<PropertyListMapEntry*>
(PL_DHashTableOperate(&prop->mObjectValueMap, aObject, PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&prop->mObjectValueMap, aObject));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
aCallback(const_cast<void*>(aObject.get()), prop->mName, entry->value,
aData);
@ -174,8 +173,7 @@ nsPropertyTable::GetPropertyInternal(nsPropertyOwner aObject,
PropertyList* propertyList = GetPropertyListFor(aPropertyName);
if (propertyList) {
PropertyListMapEntry *entry = static_cast<PropertyListMapEntry*>
(PL_DHashTableOperate(&propertyList->mObjectValueMap, aObject,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&propertyList->mObjectValueMap, aObject));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
propValue = entry->value;
if (aRemove) {
@ -230,7 +228,7 @@ nsPropertyTable::SetPropertyInternal(nsPropertyOwner aObject,
// value is destroyed
nsresult result = NS_OK;
PropertyListMapEntry *entry = static_cast<PropertyListMapEntry*>
(PL_DHashTableOperate(&propertyList->mObjectValueMap, aObject, PL_DHASH_ADD));
(PL_DHashTableAdd(&propertyList->mObjectValueMap, aObject));
if (!entry)
return NS_ERROR_OUT_OF_MEMORY;
// A nullptr entry->key is the sign that the entry has just been allocated
@ -329,7 +327,7 @@ bool
nsPropertyTable::PropertyList::DeletePropertyFor(nsPropertyOwner aObject)
{
PropertyListMapEntry *entry = static_cast<PropertyListMapEntry*>
(PL_DHashTableOperate(&mObjectValueMap, aObject, PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&mObjectValueMap, aObject));
if (!PL_DHASH_ENTRY_IS_BUSY(entry))
return false;

View File

@ -144,7 +144,7 @@ nsScriptNameSpaceManager::AddToHash(PLDHashTable *aTable, const nsAString *aKey,
{
GlobalNameMapEntry *entry =
static_cast<GlobalNameMapEntry *>
(PL_DHashTableOperate(aTable, aKey, PL_DHASH_ADD));
(PL_DHashTableAdd(aTable, aKey));
if (!entry) {
return nullptr;
@ -161,7 +161,7 @@ void
nsScriptNameSpaceManager::RemoveFromHash(PLDHashTable *aTable,
const nsAString *aKey)
{
PL_DHashTableOperate(aTable, aKey, PL_DHASH_REMOVE);
PL_DHashTableRemove(aTable, aKey);
}
nsGlobalNameStruct*
@ -172,9 +172,8 @@ nsScriptNameSpaceManager::GetConstructorProto(const nsGlobalNameStruct* aStruct)
if (!aStruct->mAlias->mProto) {
GlobalNameMapEntry *proto =
static_cast<GlobalNameMapEntry *>
(PL_DHashTableOperate(&mGlobalNames,
&aStruct->mAlias->mProtoName,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&mGlobalNames,
&aStruct->mAlias->mProtoName));
if (PL_DHASH_ENTRY_IS_BUSY(proto)) {
aStruct->mAlias->mProto = &proto->mGlobalName;
@ -389,8 +388,7 @@ nsScriptNameSpaceManager::LookupNameInternal(const nsAString& aName,
{
GlobalNameMapEntry *entry =
static_cast<GlobalNameMapEntry *>
(PL_DHashTableOperate(&mGlobalNames, &aName,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&mGlobalNames, &aName));
if (PL_DHASH_ENTRY_IS_BUSY(entry)) {
if (aClassName) {
@ -410,8 +408,7 @@ nsScriptNameSpaceManager::LookupNavigatorName(const nsAString& aName)
{
GlobalNameMapEntry *entry =
static_cast<GlobalNameMapEntry *>
(PL_DHashTableOperate(&mNavigatorNames, &aName,
PL_DHASH_LOOKUP));
(PL_DHashTableLookup(&mNavigatorNames, &aName));
if (!PL_DHASH_ENTRY_IS_BUSY(entry)) {
return nullptr;

View File

@ -361,10 +361,11 @@ NS_IMETHODIMP
nsXMLHttpRequest::Init(nsIPrincipal* aPrincipal,
nsIScriptContext* aScriptContext,
nsIGlobalObject* aGlobalObject,
nsIURI* aBaseURI)
nsIURI* aBaseURI,
nsILoadGroup* aLoadGroup)
{
NS_ENSURE_ARG_POINTER(aPrincipal);
if (nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(aGlobalObject)) {
if (win->IsOuterWindow()) {
// Must be bound to inner window, innerize if necessary.
@ -374,7 +375,7 @@ nsXMLHttpRequest::Init(nsIPrincipal* aPrincipal,
}
}
Construct(aPrincipal, aGlobalObject, aBaseURI);
Construct(aPrincipal, aGlobalObject, aBaseURI, aLoadGroup);
return NS_OK;
}
@ -1436,6 +1437,11 @@ nsXMLHttpRequest::GetLoadGroup() const
return nullptr;
}
if (mLoadGroup) {
nsCOMPtr<nsILoadGroup> ref = mLoadGroup;
return ref.forget();
}
nsresult rv = NS_ERROR_FAILURE;
nsIScriptContext* sc =
const_cast<nsXMLHttpRequest*>(this)->GetContextForEventHandlers(&rv);

View File

@ -244,7 +244,8 @@ public:
void Construct(nsIPrincipal* aPrincipal,
nsIGlobalObject* aGlobalObject,
nsIURI* aBaseURI = nullptr)
nsIURI* aBaseURI = nullptr,
nsILoadGroup* aLoadGroup = nullptr)
{
MOZ_ASSERT(aPrincipal);
MOZ_ASSERT_IF(nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(
@ -252,6 +253,7 @@ public:
mPrincipal = aPrincipal;
BindToOwner(aGlobalObject);
mBaseURI = aBaseURI;
mLoadGroup = aLoadGroup;
}
void InitParameters(bool aAnon, bool aSystem);
@ -717,6 +719,7 @@ protected:
nsIRequestObserver* mRequestObserver;
nsCOMPtr<nsIURI> mBaseURI;
nsCOMPtr<nsILoadGroup> mLoadGroup;
uint32_t mState;

View File

@ -42,7 +42,7 @@ nsresult TestGetURL(const nsCString& aURL)
rv = secman->GetSystemPrincipal(getter_AddRefs(systemPrincipal));
TEST_ENSURE_SUCCESS(rv, "Couldn't get system principal!");
rv = xhr->Init(systemPrincipal, nullptr, nullptr, nullptr);
rv = xhr->Init(systemPrincipal, nullptr, nullptr, nullptr, nullptr);
TEST_ENSURE_SUCCESS(rv, "Couldn't initialize the XHR!");
rv = xhr->Open(getString, aURL, false, empty, empty);

View File

@ -52,7 +52,7 @@ nsresult TestNativeXMLHttpRequest()
rv = secman->GetSystemPrincipal(getter_AddRefs(systemPrincipal));
TEST_ENSURE_SUCCESS(rv, "Couldn't get system principal!");
rv = xhr->Init(systemPrincipal, nullptr, nullptr, nullptr);
rv = xhr->Init(systemPrincipal, nullptr, nullptr, nullptr, nullptr);
TEST_ENSURE_SUCCESS(rv, "Couldn't initialize the XHR!");
rv = xhr->Open(getString, testURL, false, empty, empty);

View File

@ -33,7 +33,7 @@ public:
void Shutdown();
// For IObserver.
void Notify(const hal::BatteryInformation& aBatteryInfo);
void Notify(const hal::BatteryInformation& aBatteryInfo) MOZ_OVERRIDE;
/**
* WebIDL Interface

View File

@ -2068,8 +2068,8 @@ ReportLenientThisUnwrappingFailure(JSContext* cx, JSObject* obj)
}
bool
GetWindowForJSImplementedObject(JSContext* cx, JS::Handle<JSObject*> obj,
nsPIDOMWindow** window)
GetContentGlobalForJSImplementedObject(JSContext* cx, JS::Handle<JSObject*> obj,
nsIGlobalObject** globalObj)
{
// Be very careful to not get tricked here.
MOZ_ASSERT(NS_IsMainThread());
@ -2095,37 +2095,36 @@ GetWindowForJSImplementedObject(JSContext* cx, JS::Handle<JSObject*> obj,
return false;
}
// It's OK if we have null here: that just means the content-side
// object really wasn't associated with any window.
nsCOMPtr<nsPIDOMWindow> win(do_QueryInterface(global.GetAsSupports()));
win.forget(window);
DebugOnly<nsresult> rv = CallQueryInterface(global.GetAsSupports(), globalObj);
MOZ_ASSERT(NS_SUCCEEDED(rv));
MOZ_ASSERT(*globalObj);
return true;
}
already_AddRefed<nsPIDOMWindow>
already_AddRefed<nsIGlobalObject>
ConstructJSImplementation(JSContext* aCx, const char* aContractId,
const GlobalObject& aGlobal,
JS::MutableHandle<JSObject*> aObject,
ErrorResult& aRv)
{
// Get the window to use as a parent and for initialization.
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal.GetAsSupports());
if (!window) {
// Get the global object to use as a parent and for initialization.
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
if (!global) {
aRv.Throw(NS_ERROR_FAILURE);
return nullptr;
}
ConstructJSImplementation(aCx, aContractId, window, aObject, aRv);
ConstructJSImplementation(aCx, aContractId, global, aObject, aRv);
if (aRv.Failed()) {
return nullptr;
}
return window.forget();
return global.forget();
}
void
ConstructJSImplementation(JSContext* aCx, const char* aContractId,
nsPIDOMWindow* aWindow,
nsIGlobalObject* aGlobal,
JS::MutableHandle<JSObject*> aObject,
ErrorResult& aRv)
{
@ -2145,12 +2144,14 @@ ConstructJSImplementation(JSContext* aCx, const char* aContractId,
aRv.Throw(rv);
return;
}
// Initialize the object, if it implements nsIDOMGlobalPropertyInitializer.
// Initialize the object, if it implements nsIDOMGlobalPropertyInitializer
// and our global is a window.
nsCOMPtr<nsIDOMGlobalPropertyInitializer> gpi =
do_QueryInterface(implISupports);
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aGlobal);
if (gpi) {
JS::Rooted<JS::Value> initReturn(aCx);
rv = gpi->Init(aWindow, &initReturn);
rv = gpi->Init(window, &initReturn);
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return;

View File

@ -2651,19 +2651,19 @@ GetUnforgeableHolder(JSObject* aGlobal, prototypes::ID aId)
}
// Given a JSObject* that represents the chrome side of a JS-implemented WebIDL
// interface, get the nsPIDOMWindow corresponding to the content side, if any.
// interface, get the nsIGlobalObject corresponding to the content side, if any.
// A false return means an exception was thrown.
bool
GetWindowForJSImplementedObject(JSContext* cx, JS::Handle<JSObject*> obj,
nsPIDOMWindow** window);
GetContentGlobalForJSImplementedObject(JSContext* cx, JS::Handle<JSObject*> obj,
nsIGlobalObject** global);
void
ConstructJSImplementation(JSContext* aCx, const char* aContractId,
nsPIDOMWindow* aWindow,
nsIGlobalObject* aGlobal,
JS::MutableHandle<JSObject*> aObject,
ErrorResult& aRv);
already_AddRefed<nsPIDOMWindow>
already_AddRefed<nsIGlobalObject>
ConstructJSImplementation(JSContext* aCx, const char* aContractId,
const GlobalObject& aGlobal,
JS::MutableHandle<JSObject*> aObject,

View File

@ -3710,12 +3710,12 @@ class CastableObjectUnwrapper():
// XXXbz Wish we could check for a JS-implemented object
// that already has a content reflection...
if (!IsDOMObject(js::UncheckedUnwrap(${source}))) {
nsCOMPtr<nsPIDOMWindow> ourWindow;
if (!GetWindowForJSImplementedObject(cx, Callback(), getter_AddRefs(ourWindow))) {
nsCOMPtr<nsIGlobalObject> contentGlobal;
if (!GetContentGlobalForJSImplementedObject(cx, Callback(), getter_AddRefs(contentGlobal))) {
$*{exceptionCode}
}
JS::Rooted<JSObject*> jsImplSourceObj(cx, ${source});
${target} = new ${type}(jsImplSourceObj, ourWindow);
${target} = new ${type}(jsImplSourceObj, contentGlobal);
} else {
$*{codeOnFailure}
}
@ -12291,7 +12291,7 @@ class CGBindingRoot(CGThing):
jsImplemented = config.getDescriptors(webIDLFile=webIDLFile,
isJSImplemented=True)
bindingDeclareHeaders["nsWeakReference.h"] = jsImplemented
bindingHeaders["nsPIDOMWindow.h"] = jsImplemented
bindingHeaders["nsIGlobalObject.h"] = jsImplemented
bindingHeaders["AtomList.h"] = hasNonEmptyDictionaries or jsImplemented or callbackDescriptors
def addHeaderBasedOnTypes(header, typeChecker):
@ -13300,7 +13300,6 @@ class CGJSImplMethod(CGJSImplMember):
initCall = fill(
"""
// Wrap the object before calling __Init so that __DOM_IMPL__ is available.
nsCOMPtr<nsIGlobalObject> globalHolder = do_QueryInterface(window);
JS::Rooted<JSObject*> scopeObj(cx, globalHolder->GetGlobalJSObject());
MOZ_ASSERT(js::IsObjectInContextCompartment(scopeObj, cx));
JS::Rooted<JS::Value> wrappedVal(cx);
@ -13326,13 +13325,13 @@ def genConstructorBody(descriptor, initCall=""):
return fill(
"""
JS::Rooted<JSObject*> jsImplObj(cx);
nsCOMPtr<nsPIDOMWindow> window =
nsCOMPtr<nsIGlobalObject> globalHolder =
ConstructJSImplementation(cx, "${contractId}", global, &jsImplObj, aRv);
if (aRv.Failed()) {
return nullptr;
}
// Build the C++ implementation.
nsRefPtr<${implClass}> impl = new ${implClass}(jsImplObj, window);
nsRefPtr<${implClass}> impl = new ${implClass}(jsImplObj, globalHolder);
$*{initCall}
return impl.forget();
""",
@ -13516,7 +13515,7 @@ class CGJSImplClass(CGBindingImplClass):
constructor = ClassConstructor(
[Argument("JS::Handle<JSObject*>", "aJSImplObject"),
Argument("nsPIDOMWindow*", "aParent")],
Argument("nsIGlobalObject*", "aParent")],
visibility="public",
baseConstructors=baseConstructors)
@ -13587,12 +13586,10 @@ class CGJSImplClass(CGBindingImplClass):
if (global.Failed()) {
return false;
}
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(global.GetAsSupports());
if (!window) {
return ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 1 of ${ifaceName}._create", "Window");
}
nsCOMPtr<nsIGlobalObject> globalHolder = do_QueryInterface(global.GetAsSupports());
MOZ_ASSERT(globalHolder);
JS::Rooted<JSObject*> arg(cx, &args[1].toObject());
nsRefPtr<${implName}> impl = new ${implName}(arg, window);
nsRefPtr<${implName}> impl = new ${implName}(arg, globalHolder);
MOZ_ASSERT(js::IsObjectInContextCompartment(arg, cx));
return GetOrCreateDOMReflector(cx, impl, args.rval());
""",

View File

@ -18,7 +18,7 @@ class TestCImplementedInterface : public TestJSImplInterface
{
public:
TestCImplementedInterface(JS::Handle<JSObject*> aJSImpl,
nsPIDOMWindow* aParent)
nsIGlobalObject* aParent)
: TestJSImplInterface(aJSImpl, aParent)
{}
};
@ -27,7 +27,7 @@ class TestCImplementedInterface2 : public nsISupports,
public nsWrapperCache
{
public:
explicit TestCImplementedInterface2(nsPIDOMWindow* aParent)
explicit TestCImplementedInterface2(nsIGlobalObject* aParent)
{}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TestCImplementedInterface2)

View File

@ -10,6 +10,7 @@
#include "nsIIccProvider.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIMobileConnectionService.h"
#include "nsITelephonyCallInfo.h"
#include "nsITelephonyService.h"
#include "nsRadioInterfaceLayer.h" // For NS_RILCONTENTHELPER_CONTRACTID.
#include "nsServiceManagerUtils.h"
@ -186,48 +187,42 @@ MobileConnectionListener::Listen(bool aStart)
*/
NS_IMPL_ISUPPORTS(TelephonyListener, nsITelephonyListener)
NS_IMETHODIMP
TelephonyListener::CallStateChanged(uint32_t aServiceId,
uint32_t aCallIndex,
uint16_t aCallState,
const nsAString& aNumber,
uint16_t aNumberPresentation,
const nsAString& aName,
uint16_t aNamePresentation,
bool aIsOutgoing,
bool aIsEmergency,
bool aIsConference,
bool aIsSwitchable,
bool aIsMergeable)
/**
* @param aSend A boolean indicates whether we need to notify headset or not
*/
nsresult
TelephonyListener::HandleCallInfo(nsITelephonyCallInfo* aInfo, bool aSend)
{
BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);
hfp->HandleCallStateChanged(aCallIndex, aCallState, EmptyString(), aNumber,
aIsOutgoing, aIsConference, true);
uint32_t callIndex;
uint16_t callState;
nsAutoString number;
bool isOutgoing;
bool isConference;
aInfo->GetCallIndex(&callIndex);
aInfo->GetCallState(&callState);
aInfo->GetNumber(number);
aInfo->GetIsOutgoing(&isOutgoing);
aInfo->GetIsConference(&isConference);
hfp->HandleCallStateChanged(callIndex, callState, EmptyString(), number,
isOutgoing, isConference, aSend);
return NS_OK;
}
NS_IMETHODIMP
TelephonyListener::EnumerateCallState(uint32_t aServiceId,
uint32_t aCallIndex,
uint16_t aCallState,
const nsAString_internal& aNumber,
uint16_t aNumberPresentation,
const nsAString& aName,
uint16_t aNamePresentation,
bool aIsOutgoing,
bool aIsEmergency,
bool aIsConference,
bool aIsSwitchable,
bool aIsMergeable)
TelephonyListener::CallStateChanged(nsITelephonyCallInfo* aInfo)
{
BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);
return HandleCallInfo(aInfo, true);
}
hfp->HandleCallStateChanged(aCallIndex, aCallState, EmptyString(), aNumber,
aIsOutgoing, aIsConference, false);
return NS_OK;
NS_IMETHODIMP
TelephonyListener::EnumerateCallState(nsITelephonyCallInfo* aInfo)
{
return HandleCallInfo(aInfo, false);
}
NS_IMETHODIMP

View File

@ -13,6 +13,7 @@
#include "nsIIccProvider.h"
#include "nsIMobileConnectionService.h"
#include "nsITelephonyCallInfo.h"
#include "nsITelephonyService.h"
BEGIN_BLUETOOTH_NAMESPACE
@ -61,6 +62,9 @@ public:
virtual ~TelephonyListener() { }
bool Listen(bool aStart);
private:
nsresult HandleCallInfo(nsITelephonyCallInfo* aInfo, bool aSend);
};
class BluetoothRilListener

View File

@ -22,4 +22,4 @@ struct ParamTraits<mozilla::dom::bluetooth::BluetoothObjectType>
} // namespace IPC
#endif // mozilla_dom_bluetooth_ipc_bluetoothchild_h__
#endif // mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__

View File

@ -186,48 +186,42 @@ MobileConnectionListener::Listen(bool aStart)
*/
NS_IMPL_ISUPPORTS(TelephonyListener, nsITelephonyListener)
NS_IMETHODIMP
TelephonyListener::CallStateChanged(uint32_t aServiceId,
uint32_t aCallIndex,
uint16_t aCallState,
const nsAString& aNumber,
uint16_t aNumberPresentation,
const nsAString& aName,
uint16_t aNamePresentation,
bool aIsOutgoing,
bool aIsEmergency,
bool aIsConference,
bool aIsSwitchable,
bool aIsMergeable)
/**
* @param aSend A boolean indicates whether we need to notify headset or not
*/
nsresult
TelephonyListener::HandleCallInfo(nsITelephonyCallInfo* aInfo, bool aSend)
{
BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);
hfp->HandleCallStateChanged(aCallIndex, aCallState, EmptyString(), aNumber,
aIsOutgoing, aIsConference, true);
uint32_t callIndex;
uint16_t callState;
nsAutoString number;
bool isOutgoing;
bool isConference;
aInfo->GetCallIndex(&callIndex);
aInfo->GetCallState(&callState);
aInfo->GetNumber(number);
aInfo->GetIsOutgoing(&isOutgoing);
aInfo->GetIsConference(&isConference);
hfp->HandleCallStateChanged(callIndex, callState, EmptyString(), number,
isOutgoing, isConference, aSend);
return NS_OK;
}
NS_IMETHODIMP
TelephonyListener::EnumerateCallState(uint32_t aServiceId,
uint32_t aCallIndex,
uint16_t aCallState,
const nsAString_internal& aNumber,
uint16_t aNumberPresentation,
const nsAString& aName,
uint16_t aNamePresentation,
bool aIsOutgoing,
bool aIsEmergency,
bool aIsConference,
bool aIsSwitchable,
bool aIsMergeable)
TelephonyListener::CallStateChanged(nsITelephonyCallInfo* aInfo)
{
BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);
return HandleCallInfo(aInfo, true);
}
hfp->HandleCallStateChanged(aCallIndex, aCallState, EmptyString(), aNumber,
aIsOutgoing, aIsConference, false);
return NS_OK;
NS_IMETHODIMP
TelephonyListener::EnumerateCallState(nsITelephonyCallInfo* aInfo)
{
return HandleCallInfo(aInfo, false);
}
NS_IMETHODIMP

View File

@ -61,6 +61,9 @@ public:
virtual ~TelephonyListener() { }
bool Listen(bool aStart);
private:
nsresult HandleCallInfo(nsITelephonyCallInfo* aInfo, bool aSend);
};
class BluetoothRilListener

View File

@ -30,4 +30,4 @@ struct ParamTraits<mozilla::dom::bluetooth::BluetoothStatus>
} // namespace IPC
#endif // mozilla_dom_bluetooth_ipc_bluetoothchild_h__
#endif // mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__

View File

@ -94,7 +94,7 @@ function BrowserElementChild() {
this._isContentWindowCreated = false;
this._pendingSetInputMethodActive = [];
this._forceDispatchSelectionStateChanged = false;
this._selectionStateChangedTarget = null;
this._init();
};
@ -594,13 +594,18 @@ BrowserElementChild.prototype = {
_selectionStateChangedHandler: function(e) {
e.stopPropagation();
if (!this._isContentWindowCreated) {
return;
}
let boundingClientRect = e.boundingClientRect;
let isCollapsed = (e.selectedText.length == 0);
let isMouseUp = (e.states.indexOf('mouseup') == 0);
let canPaste = this._isCommandEnabled("paste");
if (!this._forceDispatchSelectionStateChanged) {
if (this._selectionStateChangedTarget != e.target) {
// SelectionStateChanged events with the following states are not
// necessary to trigger the text dialog, bypass these events
// by default.
@ -613,25 +618,28 @@ BrowserElementChild.prototype = {
}
// The collapsed SelectionStateChanged event is unnecessary to dispatch,
// bypass this event by default. But there is one exception to support
// the shortcut mode which can paste previous copied content easily
// bypass this event by default, but here comes some exceptional cases
if (isCollapsed) {
if (isMouseUp && canPaste) {
//Dispatch this selection change event to support shortcut mode
// Always dispatch to support shortcut mode which can paste previous
// copied content easily
} else if (e.states.indexOf('blur') == 0) {
// Always dispatch to notify the blur for the focus content
} else {
return;
}
}
}
// If we select something and selection range is visible, we set the
// forceDispatchSelectionStateChanged flag as true to dispatch the
// next SelectionStateChange event so that the parent side can
// hide the text dialog.
// If we select something and selection range is visible, we cache current
// event's target to selectionStateChangedTarget.
// And dispatch the next SelectionStateChagne event if target is matched, so
// that the parent side can hide the text dialog.
// We clear selectionStateChangedTarget if selection carets are invisible.
if (e.visible && !isCollapsed) {
this._forceDispatchSelectionStateChanged = true;
this._selectionStateChangedTarget = e.target;
} else {
this._forceDispatchSelectionStateChanged = false;
this._selectionStateChangedTarget = null;
}
let zoomFactor = content.screen.width / content.innerWidth;

View File

@ -181,12 +181,15 @@ function testSelectAll(e) {
// Skip mozbrowser test if we're at child process.
if (!isChildProcess()) {
iframeOuter.addEventListener("mozbrowserselectionstatechanged", function selectchangeforselectall(e) {
iframeOuter.removeEventListener("mozbrowserselectionstatechanged", selectchangeforselectall, true);
ok(true, "got mozbrowserselectionstatechanged event." + stateMeaning);
ok(e.detail, "event.detail is not null." + stateMeaning);
ok(e.detail.width != 0, "event.detail.width is not zero" + stateMeaning);
ok(e.detail.height != 0, "event.detail.height is not zero" + stateMeaning);
SimpleTest.executeSoon(function() { testCopy1(e); });
if (e.detail.states.indexOf('selectall') == 0) {
iframeOuter.removeEventListener("mozbrowserselectionstatechanged", selectchangeforselectall, true);
ok(true, "got mozbrowserselectionstatechanged event." + stateMeaning);
ok(e.detail, "event.detail is not null." + stateMeaning);
ok(e.detail.width != 0, "event.detail.width is not zero" + stateMeaning);
ok(e.detail.height != 0, "event.detail.height is not zero" + stateMeaning);
ok(e.detail.states, "event.detail.state " + e.detail.states);
SimpleTest.executeSoon(function() { testCopy1(e); });
}
}, true);
}

View File

@ -0,0 +1,57 @@
/* Any copyright is dedicated to the public domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// Bug 1111433: Send out the SelectionStateChanged event with Blur state
"use strict";
SimpleTest.waitForExplicitFinish();
browserElementTestHelpers.setEnabledPref(true);
browserElementTestHelpers.setSelectionChangeEnabledPref(true);
browserElementTestHelpers.addPermission();
var mm;
var iframe;
var changefocus = function () {
var elt = content.document.getElementById("text");
if (elt) {
elt.focus();
elt.select();
elt.blur();
}
}
function runTest() {
iframe = document.createElement('iframe');
iframe.setAttribute('mozbrowser', 'true');
document.body.appendChild(iframe);
mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
iframe.src = "data:text/html,<html><body>" +
"<textarea id='text'> Bug 1111433 </textarea>"+
"</body></html>";
var loadtime = 0;
iframe.addEventListener("mozbrowserloadend", function onloadend(e) {
loadtime++;
if (loadtime === 2) {
iframe.removeEventListener("mozbrowserloadend", onloadend);
SimpleTest.executeSoon(function() { testBlur(e); });
}
});
}
function testBlur(e) {
iframe.addEventListener("mozbrowserselectionstatechanged", function selectionstatechanged(e) {
iframe.removeEventListener("mozbrowserselectionstatechanged", selectionstatechanged, true);
ok(e.detail.states.indexOf('blur') == 0, "received state " + e.detail.states);
SimpleTest.finish();
}, true);
iframe.focus();
mm.loadFrameScript('data:,(' + changefocus.toString() + ')();', false);
}
addEventListener('testready', runTest);

View File

@ -70,6 +70,8 @@ skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_oop_ScrollEvent.html]
[test_browserElement_oop_SecurityChange.html]
skip-if = toolkit == 'android' || (toolkit == 'gonk' && !debug) #TIMED_OUT, bug 766586
[test_browserElement_oop_SelectionStateBlur.html]
skip-if = (toolkit == 'gonk') # Disabled on b2g due to bug 1097419
[test_browserElement_oop_SendEvent.html]
[test_browserElement_oop_SetInputMethodActive.html]
skip-if = (os == "android")

View File

@ -53,6 +53,7 @@ support-files =
browserElement_ScrollEvent.js
browserElement_SecurityChange.js
browserElement_SendEvent.js
browserElement_SelectionStateBlur.js
browserElement_SetInputMethodActive.js
browserElement_SetVisible.js
browserElement_SetVisibleFrames.js
@ -184,6 +185,8 @@ skip-if = (toolkit == 'gonk' && !debug)
[test_browserElement_inproc_ScrollEvent.html]
[test_browserElement_inproc_SecurityChange.html]
skip-if = toolkit == 'android' || (toolkit == 'gonk' && !debug) # android(TIMED_OUT, bug 766586) androidx86(TIMED_OUT, bug 766586)
[test_browserElement_inproc_SelectionStateBlur.html]
skip-if = (toolkit == 'gonk') # Disabled on b2g due to bug 1097419
[test_browserElement_inproc_SendEvent.html]
# The setInputMethodActive() tests will timed out on Android
[test_browserElement_inproc_SetInputMethodActive.html]

View File

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1111433
-->
<head>
<title>Test for Bug 1111433</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1111433">Mozilla Bug 1111433</a>
<script type="application/javascript;version=1.7" src="browserElement_SelectionStateBlur.js">
</script>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1111433
-->
<head>
<title>Test for Bug 1111433</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1111433">Mozilla Bug 1111433</a>
<script type="application/javascript;version=1.7" src="browserElement_SelectionStateBlur.js">
</script>
</body>
</html>

View File

@ -54,18 +54,18 @@ public:
protected:
~FallbackCameraControl();
virtual nsresult StartPreviewImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopPreviewImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult AutoFocusImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StartFaceDetectionImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopFaceDetectionImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult TakePictureImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StartPreviewImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopPreviewImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult AutoFocusImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StartFaceDetectionImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopFaceDetectionImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult TakePictureImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StartRecordingImpl(DeviceStorageFileDescriptor* aFileDescriptor,
const StartRecordingOptions* aOptions = nullptr) MOZ_OVERRIDE
{ return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopRecordingImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult PushParametersImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult PullParametersImpl() { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult StopRecordingImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult PushParametersImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
virtual nsresult PullParametersImpl() MOZ_OVERRIDE { return NS_ERROR_NOT_INITIALIZED; }
private:
FallbackCameraControl(const FallbackCameraControl&) MOZ_DELETE;

View File

@ -33,8 +33,8 @@ WebGLContext::GetExtensionString(WebGLExtensionID ext)
WEBGL_EXTENSION_IDENTIFIER(EXT_blend_minmax)
WEBGL_EXTENSION_IDENTIFIER(EXT_color_buffer_half_float)
WEBGL_EXTENSION_IDENTIFIER(EXT_frag_depth)
WEBGL_EXTENSION_IDENTIFIER(EXT_sRGB)
WEBGL_EXTENSION_IDENTIFIER(EXT_shader_texture_lod)
WEBGL_EXTENSION_IDENTIFIER(EXT_sRGB)
WEBGL_EXTENSION_IDENTIFIER(EXT_texture_filter_anisotropic)
WEBGL_EXTENSION_IDENTIFIER(OES_element_index_uint)
WEBGL_EXTENSION_IDENTIFIER(OES_standard_derivatives)
@ -95,24 +95,37 @@ bool WebGLContext::IsExtensionSupported(JSContext* cx,
return IsExtensionSupported(ext);
}
bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
bool
WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
{
if (mDisableExtensions)
return false;
// In alphabetical order
switch (ext) {
case WebGLExtensionID::OES_vertex_array_object:
case WebGLExtensionID::WEBGL_lose_context:
// Always supported.
return true;
// ANGLE_
case WebGLExtensionID::ANGLE_instanced_arrays:
return WebGLExtensionInstancedArrays::IsSupported(this);
// EXT_
case WebGLExtensionID::EXT_blend_minmax:
return WebGLExtensionBlendMinMax::IsSupported(this);
case WebGLExtensionID::EXT_color_buffer_half_float:
return WebGLExtensionColorBufferHalfFloat::IsSupported(this);
case WebGLExtensionID::EXT_frag_depth:
return WebGLExtensionFragDepth::IsSupported(this);
case WebGLExtensionID::EXT_shader_texture_lod:
return gl->IsExtensionSupported(gl::GLContext::EXT_shader_texture_lod);
case WebGLExtensionID::EXT_sRGB:
return WebGLExtensionSRGB::IsSupported(this);
case WebGLExtensionID::EXT_texture_filter_anisotropic:
return gl->IsExtensionSupported(gl::GLContext::EXT_texture_filter_anisotropic);
// OES_
case WebGLExtensionID::OES_element_index_uint:
return gl->IsSupported(gl::GLFeature::element_index_uint);
case WebGLExtensionID::OES_standard_derivatives:
return gl->IsSupported(gl::GLFeature::standard_derivatives);
case WebGLExtensionID::OES_texture_float:
return gl->IsSupported(gl::GLFeature::texture_float);
case WebGLExtensionID::OES_texture_float_linear:
@ -126,8 +139,18 @@ bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
case WebGLExtensionID::OES_texture_half_float_linear:
return gl->IsSupported(gl::GLFeature::texture_half_float_linear);
case WebGLExtensionID::EXT_texture_filter_anisotropic:
return gl->IsExtensionSupported(gl::GLContext::EXT_texture_filter_anisotropic);
case WebGLExtensionID::OES_vertex_array_object:
return true;
// WEBGL_
case WebGLExtensionID::WEBGL_color_buffer_float:
return WebGLExtensionColorBufferFloat::IsSupported(this);
case WebGLExtensionID::WEBGL_compressed_texture_atc:
return gl->IsExtensionSupported(gl::GLContext::AMD_compressed_ATC_texture);
case WebGLExtensionID::WEBGL_compressed_texture_etc1:
return gl->IsExtensionSupported(gl::GLContext::OES_compressed_ETC1_RGB8_texture);
case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
return gl->IsExtensionSupported(gl::GLContext::IMG_texture_compression_pvrtc);
case WebGLExtensionID::WEBGL_compressed_texture_s3tc:
if (gl->IsExtensionSupported(gl::GLContext::EXT_texture_compression_s3tc))
return true;
@ -135,13 +158,6 @@ bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
return gl->IsExtensionSupported(gl::GLContext::EXT_texture_compression_dxt1) &&
gl->IsExtensionSupported(gl::GLContext::ANGLE_texture_compression_dxt3) &&
gl->IsExtensionSupported(gl::GLContext::ANGLE_texture_compression_dxt5);
case WebGLExtensionID::WEBGL_compressed_texture_atc:
return gl->IsExtensionSupported(gl::GLContext::AMD_compressed_ATC_texture);
case WebGLExtensionID::WEBGL_compressed_texture_etc1:
return gl->IsExtensionSupported(gl::GLContext::OES_compressed_ETC1_RGB8_texture);
case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
return gl->IsExtensionSupported(gl::GLContext::IMG_texture_compression_pvrtc);
case WebGLExtensionID::WEBGL_depth_texture:
// WEBGL_depth_texture supports DEPTH_STENCIL textures
if (!gl->IsSupported(gl::GLFeature::packed_depth_stencil))
@ -149,17 +165,11 @@ bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
return gl->IsSupported(gl::GLFeature::depth_texture) ||
gl->IsExtensionSupported(gl::GLContext::ANGLE_depth_texture);
case WebGLExtensionID::ANGLE_instanced_arrays:
return WebGLExtensionInstancedArrays::IsSupported(this);
case WebGLExtensionID::EXT_sRGB:
return WebGLExtensionSRGB::IsSupported(this);
case WebGLExtensionID::WEBGL_draw_buffers:
return WebGLExtensionDrawBuffers::IsSupported(this);
case WebGLExtensionID::EXT_frag_depth:
return WebGLExtensionFragDepth::IsSupported(this);
case WebGLExtensionID::EXT_shader_texture_lod:
return gl->IsExtensionSupported(gl::GLContext::EXT_shader_texture_lod);
case WebGLExtensionID::WEBGL_lose_context:
// We always support this extension.
return true;
default:
// For warnings-as-errors.
@ -169,15 +179,13 @@ bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
if (Preferences::GetBool("webgl.enable-draft-extensions", false) ||
IsWebGL2())
{
/* None for now.
switch (ext) {
case WebGLExtensionID::EXT_color_buffer_half_float:
return WebGLExtensionColorBufferHalfFloat::IsSupported(this);
case WebGLExtensionID::WEBGL_color_buffer_float:
return WebGLExtensionColorBufferFloat::IsSupported(this);
default:
// For warnings-as-errors.
break;
}
*/
}
return false;
@ -292,39 +300,38 @@ WebGLContext::EnableExtension(WebGLExtensionID ext)
WebGLExtensionBase* obj = nullptr;
switch (ext) {
// ANGLE_
case WebGLExtensionID::ANGLE_instanced_arrays:
obj = new WebGLExtensionInstancedArrays(this);
break;
// EXT_
case WebGLExtensionID::EXT_blend_minmax:
obj = new WebGLExtensionBlendMinMax(this);
break;
case WebGLExtensionID::EXT_color_buffer_half_float:
obj = new WebGLExtensionColorBufferHalfFloat(this);
break;
case WebGLExtensionID::EXT_frag_depth:
obj = new WebGLExtensionFragDepth(this);
break;
case WebGLExtensionID::EXT_shader_texture_lod:
obj = new WebGLExtensionShaderTextureLod(this);
break;
case WebGLExtensionID::EXT_sRGB:
obj = new WebGLExtensionSRGB(this);
break;
case WebGLExtensionID::EXT_texture_filter_anisotropic:
obj = new WebGLExtensionTextureFilterAnisotropic(this);
break;
// OES_
case WebGLExtensionID::OES_element_index_uint:
obj = new WebGLExtensionElementIndexUint(this);
break;
case WebGLExtensionID::OES_standard_derivatives:
obj = new WebGLExtensionStandardDerivatives(this);
break;
case WebGLExtensionID::EXT_texture_filter_anisotropic:
obj = new WebGLExtensionTextureFilterAnisotropic(this);
break;
case WebGLExtensionID::WEBGL_lose_context:
obj = new WebGLExtensionLoseContext(this);
break;
case WebGLExtensionID::WEBGL_compressed_texture_s3tc:
obj = new WebGLExtensionCompressedTextureS3TC(this);
break;
case WebGLExtensionID::WEBGL_compressed_texture_atc:
obj = new WebGLExtensionCompressedTextureATC(this);
break;
case WebGLExtensionID::WEBGL_compressed_texture_etc1:
obj = new WebGLExtensionCompressedTextureETC1(this);
break;
case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
obj = new WebGLExtensionCompressedTexturePVRTC(this);
break;
case WebGLExtensionID::WEBGL_debug_renderer_info:
obj = new WebGLExtensionDebugRendererInfo(this);
break;
case WebGLExtensionID::WEBGL_debug_shaders:
obj = new WebGLExtensionDebugShaders(this);
break;
case WebGLExtensionID::WEBGL_depth_texture:
obj = new WebGLExtensionDepthTexture(this);
break;
case WebGLExtensionID::OES_texture_float:
obj = new WebGLExtensionTextureFloat(this);
break;
@ -337,36 +344,44 @@ WebGLContext::EnableExtension(WebGLExtensionID ext)
case WebGLExtensionID::OES_texture_half_float_linear:
obj = new WebGLExtensionTextureHalfFloatLinear(this);
break;
case WebGLExtensionID::OES_vertex_array_object:
obj = new WebGLExtensionVertexArray(this);
break;
// WEBGL_
case WebGLExtensionID::WEBGL_color_buffer_float:
obj = new WebGLExtensionColorBufferFloat(this);
break;
case WebGLExtensionID::EXT_color_buffer_half_float:
obj = new WebGLExtensionColorBufferHalfFloat(this);
case WebGLExtensionID::WEBGL_compressed_texture_atc:
obj = new WebGLExtensionCompressedTextureATC(this);
break;
case WebGLExtensionID::WEBGL_compressed_texture_etc1:
obj = new WebGLExtensionCompressedTextureETC1(this);
break;
case WebGLExtensionID::WEBGL_compressed_texture_pvrtc:
obj = new WebGLExtensionCompressedTexturePVRTC(this);
break;
case WebGLExtensionID::WEBGL_compressed_texture_s3tc:
obj = new WebGLExtensionCompressedTextureS3TC(this);
break;
case WebGLExtensionID::WEBGL_debug_renderer_info:
obj = new WebGLExtensionDebugRendererInfo(this);
break;
case WebGLExtensionID::WEBGL_debug_shaders:
obj = new WebGLExtensionDebugShaders(this);
break;
case WebGLExtensionID::WEBGL_depth_texture:
obj = new WebGLExtensionDepthTexture(this);
break;
case WebGLExtensionID::WEBGL_draw_buffers:
obj = new WebGLExtensionDrawBuffers(this);
break;
case WebGLExtensionID::OES_vertex_array_object:
obj = new WebGLExtensionVertexArray(this);
break;
case WebGLExtensionID::ANGLE_instanced_arrays:
obj = new WebGLExtensionInstancedArrays(this);
break;
case WebGLExtensionID::EXT_sRGB:
obj = new WebGLExtensionSRGB(this);
break;
case WebGLExtensionID::EXT_frag_depth:
obj = new WebGLExtensionFragDepth(this);
break;
case WebGLExtensionID::EXT_blend_minmax:
obj = new WebGLExtensionBlendMinMax(this);
break;
case WebGLExtensionID::EXT_shader_texture_lod:
obj = new WebGLExtensionShaderTextureLod(this);
case WebGLExtensionID::WEBGL_lose_context:
obj = new WebGLExtensionLoseContext(this);
break;
default:
MOZ_ASSERT(false, "should not get there.");
break;
}
mExtensions[ext] = obj;

View File

@ -499,7 +499,6 @@ support-files = webgl-conformance/../webgl-mochitest/driver-info.js
[webgl-conformance/_wrappers/test_conformance__buffers__index-validation-with-resized-buffer.html]
[webgl-conformance/_wrappers/test_conformance__buffers__index-validation.html]
[webgl-conformance/_wrappers/test_conformance__canvas__buffer-offscreen-test.html]
skip-if = os == 'android' # Bug 1102402 - It fails intermittently and causes a lot of retried jobs
[webgl-conformance/_wrappers/test_conformance__canvas__buffer-preserve-test.html]
[webgl-conformance/_wrappers/test_conformance__canvas__canvas-test.html]
[webgl-conformance/_wrappers/test_conformance__canvas__canvas-zero-size.html]
@ -520,6 +519,7 @@ skip-if = (os == 'b2g')
[webgl-conformance/_wrappers/test_conformance__extensions__oes-standard-derivatives.html]
[webgl-conformance/_wrappers/test_conformance__extensions__ext-texture-filter-anisotropic.html]
[webgl-conformance/_wrappers/test_conformance__extensions__oes-texture-float.html]
fail-if = (os == 'linux')
[webgl-conformance/_wrappers/test_conformance__extensions__oes-vertex-array-object.html]
[webgl-conformance/_wrappers/test_conformance__extensions__webgl-debug-renderer-info.html]
[webgl-conformance/_wrappers/test_conformance__extensions__webgl-debug-shaders.html]
@ -768,7 +768,7 @@ skip-if = (os == 'android') || (os == 'b2g') || (os == 'linux')
[webgl-conformance/_wrappers/test_conformance__textures__texture-formats-test.html]
[webgl-conformance/_wrappers/test_conformance__textures__texture-mips.html]
[webgl-conformance/_wrappers/test_conformance__textures__texture-npot-video.html]
skip-if = os == 'win' || buildapp == 'mulet' # Mulet - bug 1089453 (crashes in libLLVM-3.0.so)
skip-if = os == 'win'
[webgl-conformance/_wrappers/test_conformance__textures__texture-npot.html]
[webgl-conformance/_wrappers/test_conformance__textures__texture-size.html]
skip-if = os == 'android'

View File

@ -31,6 +31,7 @@ EXTRA_SUPPORT_FILES = [
ACCEPTABLE_ERRATA_KEYS = set([
'skip-if',
'fail-if',
])
GENERATED_HEADER = '''

View File

@ -77,6 +77,12 @@ skip-if = (os == 'b2g')
# Intermittently asserts on 'B2G ICS Emulator Debug'.
skip-if = (os == 'b2g')
########################################################################
# Linux
[_wrappers/test_conformance__extensions__oes-texture-float.html]
# Failures after enabling color_buffer_[half_]float.
fail-if = (os == 'linux')
########################################################################
# Mac
[_wrappers/test_conformance__canvas__drawingbuffer-static-canvas-test.html]

View File

@ -28,11 +28,11 @@ private:
// MOZ_FINAL suppresses -Werror,-Wdelete-non-virtual-dtor
~CellBroadcastParent() {};
virtual void ActorDestroy(ActorDestroyReason aWhy);
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
};
} // namespace cellbroadcast
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_cellbroadcast_CellBroadcastParent_h
#endif // mozilla_dom_cellbroadcast_CellBroadcastParent_h

View File

@ -139,7 +139,7 @@ public:
SECKEYPublicKey* GetPublicKey() const;
// For nsNSSShutDownObject
virtual void virtualDestroyNSSReference();
virtual void virtualDestroyNSSReference() MOZ_OVERRIDE;
void destructorSafeDestroyNSSReference();
// Serialization and deserialization convenience methods

View File

@ -2104,12 +2104,14 @@ private:
return NS_OK;
}
virtual void Resolve() {
virtual void Resolve() MOZ_OVERRIDE
{
mKey->SetSymKey(mKeyData);
mResultPromise->MaybeResolve(mKey);
}
virtual void Cleanup() {
virtual void Cleanup() MOZ_OVERRIDE
{
mKey = nullptr;
}
};
@ -2744,7 +2746,8 @@ private:
return NS_OK;
}
virtual void Resolve() MOZ_OVERRIDE {
virtual void Resolve() MOZ_OVERRIDE
{
mTask->SetData(mResult);
mTask->DispatchWithPromise(mResultPromise);
mResolved = true;
@ -2777,7 +2780,8 @@ private:
nsRefPtr<ImportKeyTask> mTask;
bool mResolved;
virtual void Resolve() MOZ_OVERRIDE {
virtual void Resolve() MOZ_OVERRIDE
{
mTask->SetKeyData(KeyEncryptTask::mResult);
mTask->DispatchWithPromise(KeyEncryptTask::mResultPromise);
mResolved = true;

View File

@ -1005,9 +1005,12 @@ DataStoreService::GetDataStoresResolve(nsPIDOMWindow* aWindow,
return;
}
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aWindow);
MOZ_ASSERT(global);
JSAutoCompartment ac(cx, dataStoreJS);
nsRefPtr<DataStoreImpl> dataStoreObj = new DataStoreImpl(dataStoreJS,
aWindow);
global);
nsRefPtr<DataStore> exposedStore = new DataStore(aWindow);

View File

@ -2202,21 +2202,21 @@ nsDOMDeviceStorageCursor::GetTypes(nsIArray** aTypes)
}
NS_IMETHODIMP
nsDOMDeviceStorageCursor::GetPrincipal(nsIPrincipal * *aRequestingPrincipal)
nsDOMDeviceStorageCursor::GetPrincipal(nsIPrincipal** aRequestingPrincipal)
{
NS_IF_ADDREF(*aRequestingPrincipal = mPrincipal);
return NS_OK;
}
NS_IMETHODIMP
nsDOMDeviceStorageCursor::GetWindow(nsIDOMWindow * *aRequestingWindow)
nsDOMDeviceStorageCursor::GetWindow(nsIDOMWindow** aRequestingWindow)
{
NS_IF_ADDREF(*aRequestingWindow = GetOwner());
return NS_OK;
}
NS_IMETHODIMP
nsDOMDeviceStorageCursor::GetElement(nsIDOMElement * *aRequestingElement)
nsDOMDeviceStorageCursor::GetElement(nsIDOMElement** aRequestingElement)
{
*aRequestingElement = nullptr;
return NS_OK;
@ -2900,7 +2900,7 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(DeviceStorageRequest,
nsIContentPermissionRequest)
NS_IMETHOD Run()
NS_IMETHOD Run() MOZ_OVERRIDE
{
MOZ_ASSERT(NS_IsMainThread());
@ -2912,7 +2912,7 @@ public:
return nsContentPermissionUtils::AskPermission(this, mWindow);
}
NS_IMETHODIMP GetTypes(nsIArray** aTypes)
NS_IMETHODIMP GetTypes(nsIArray** aTypes) MOZ_OVERRIDE
{
nsCString type;
nsresult rv =
@ -2932,25 +2932,25 @@ public:
return nsContentPermissionUtils::CreatePermissionArray(type, access, emptyOptions, aTypes);
}
NS_IMETHOD GetPrincipal(nsIPrincipal * *aRequestingPrincipal)
NS_IMETHOD GetPrincipal(nsIPrincipal * *aRequestingPrincipal) MOZ_OVERRIDE
{
NS_IF_ADDREF(*aRequestingPrincipal = mPrincipal);
return NS_OK;
}
NS_IMETHOD GetWindow(nsIDOMWindow * *aRequestingWindow)
NS_IMETHOD GetWindow(nsIDOMWindow * *aRequestingWindow) MOZ_OVERRIDE
{
NS_IF_ADDREF(*aRequestingWindow = mWindow);
return NS_OK;
}
NS_IMETHOD GetElement(nsIDOMElement * *aRequestingElement)
NS_IMETHOD GetElement(nsIDOMElement * *aRequestingElement) MOZ_OVERRIDE
{
*aRequestingElement = nullptr;
return NS_OK;
}
NS_IMETHOD Cancel()
NS_IMETHOD Cancel() MOZ_OVERRIDE
{
nsCOMPtr<nsIRunnable> event
= new PostErrorEvent(mRequest.forget(),
@ -2958,7 +2958,7 @@ public:
return NS_DispatchToMainThread(event);
}
NS_IMETHOD Allow(JS::HandleValue aChoices)
NS_IMETHOD Allow(JS::HandleValue aChoices) MOZ_OVERRIDE
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aChoices.isUndefined());

View File

@ -20,6 +20,7 @@
#include "nsJSUtils.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/SettingChangeNotificationBinding.h"
#include "mozilla/DebugOnly.h"
#define TUNE_THREAD_TIMEOUT_MS 5000
@ -780,7 +781,7 @@ FMRadioService::SetRDSGroupMask(uint32_t aRDSGroupMask)
{
mRDSGroupMask = aRDSGroupMask;
if (IsFMRadioOn() && mRDSEnabled) {
bool enabled = hal::EnableRDS(mRDSGroupMask | DOM_PARSED_RDS_GROUPS);
DebugOnly<bool> enabled = hal::EnableRDS(mRDSGroupMask | DOM_PARSED_RDS_GROUPS);
MOZ_ASSERT(enabled);
}
}

View File

@ -133,7 +133,7 @@ public:
MOZ_COUNT_CTOR(GeolocationSettingsCallback);
}
NS_IMETHOD Handle(const nsAString& aName, JS::Handle<JS::Value> aResult)
NS_IMETHOD Handle(const nsAString& aName, JS::Handle<JS::Value> aResult) MOZ_OVERRIDE
{
MOZ_ASSERT(NS_IsMainThread());
@ -159,7 +159,7 @@ public:
return NS_OK;
}
NS_IMETHOD HandleError(const nsAString& aName)
NS_IMETHOD HandleError(const nsAString& aName) MOZ_OVERRIDE
{
if (aName.EqualsASCII(GEO_SETTINGS_ENABLED)) {
GPSLOG("Unable to get value for '" GEO_SETTINGS_ENABLED "'");

View File

@ -63,19 +63,23 @@ ASSERT_ICC_LOCK_TYPE_EQUALITY(Pin2, CARD_LOCK_TYPE_PIN2);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Puk, CARD_LOCK_TYPE_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Puk2, CARD_LOCK_TYPE_PUK2);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Nck, CARD_LOCK_TYPE_NCK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Nsck, CARD_LOCK_TYPE_NSCK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Nck1, CARD_LOCK_TYPE_NCK1);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Nck2, CARD_LOCK_TYPE_NCK2);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Hnck, CARD_LOCK_TYPE_HNCK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Cck, CARD_LOCK_TYPE_CCK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Spck, CARD_LOCK_TYPE_SPCK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Pck, CARD_LOCK_TYPE_PCK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Rcck, CARD_LOCK_TYPE_RCCK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Rspck, CARD_LOCK_TYPE_RSPCK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(NckPuk, CARD_LOCK_TYPE_NCK_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(NsckPuk, CARD_LOCK_TYPE_NSCK_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Nck1Puk, CARD_LOCK_TYPE_NCK1_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Nck2Puk, CARD_LOCK_TYPE_NCK2_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(HnckPuk, CARD_LOCK_TYPE_HNCK_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(CckPuk, CARD_LOCK_TYPE_CCK_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(SpckPuk, CARD_LOCK_TYPE_SPCK_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(PckPuk, CARD_LOCK_TYPE_PCK_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(RcckPuk, CARD_LOCK_TYPE_RCCK_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(RspckPuk, CARD_LOCK_TYPE_RSPCK_PUK);
ASSERT_ICC_LOCK_TYPE_EQUALITY(Fdn, CARD_LOCK_TYPE_FDN);
@ -106,6 +110,16 @@ ASSERT_ICC_MVNO_TYPE_EQUALITY(Gid, CARD_MVNO_TYPE_GID);
#undef ASSERT_ICC_MVNO_TYPE_EQUALITY
/**
* Enum IccService
*/
#define ASSERT_ICC_SERVICE_EQUALITY(webidlState, xpidlState) \
ASSERT_EQUALITY(IccService, webidlState, xpidlState)
ASSERT_ICC_SERVICE_EQUALITY(Fdn, CARD_SERVICE_FDN);
#undef ASSERT_ICC_SERVICE_EQUALITY
#undef ASSERT_EQUALITY
} // namespace icc

View File

@ -7,6 +7,7 @@
#include "mozilla/dom/DOMRequest.h"
#include "mozilla/dom/IccInfo.h"
#include "mozilla/dom/MozStkCommandEvent.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/ScriptSettings.h"
#include "nsIIccInfo.h"
#include "nsIIccProvider.h"
@ -34,9 +35,9 @@ IsPukCardLockType(IccLockType aLockType)
case IccLockType::RcckPuk:
case IccLockType::RspckPuk:
return true;
default:
return false;
}
return false;
}
} // anonymous namespace
@ -404,5 +405,26 @@ Icc::MatchMvno(IccMvnoType aMvnoType, const nsAString& aMvnoData,
return request.forget().downcast<DOMRequest>();
}
already_AddRefed<Promise>
Icc::GetServiceState(IccService aService, ErrorResult& aRv)
{
if (!mProvider) {
aRv.Throw(NS_ERROR_FAILURE);
return nullptr;
}
nsCOMPtr<nsISupports> supports;
nsresult rv = mProvider->GetServiceState(mClientId, GetOwner(),
static_cast<uint32_t>(aService),
getter_AddRefs(supports));
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return nullptr;
}
nsCOMPtr<Promise> promise = do_QueryInterface(supports);
return promise.forget();
}
} // namespace dom
} // namespace mozilla

View File

@ -16,6 +16,7 @@ namespace dom {
class DOMRequest;
class OwningMozIccInfoOrMozGsmIccInfoOrMozCdmaIccInfo;
class Promise;
class Icc MOZ_FINAL : public DOMEventTargetHelper
{
@ -101,6 +102,9 @@ public:
MatchMvno(IccMvnoType aMvnoType, const nsAString& aMatchData,
ErrorResult& aRv);
already_AddRefed<Promise>
GetServiceState(IccService aService, ErrorResult& aRv);
IMPL_EVENT_HANDLER(iccinfochange)
IMPL_EVENT_HANDLER(cardstatechange)
IMPL_EVENT_HANDLER(stkcommand)

View File

@ -58,7 +58,7 @@ interface nsIIccChannelCallback : nsISupports
/**
* XPCOM component (in the content process) that provides the ICC information.
*/
[scriptable, uuid(bf985ee1-14c9-43c6-a471-8ab52fb24b0d)]
[scriptable, uuid(a203cd2e-2280-4d8e-a687-42b745d322c1)]
interface nsIIccProvider : nsISupports
{
// MUST match enum IccCardState in MozIcc.webidl!
@ -101,22 +101,26 @@ interface nsIIccProvider : nsISupports
const unsigned long CARD_LOCK_TYPE_PUK = 2;
const unsigned long CARD_LOCK_TYPE_PUK2 = 3;
const unsigned long CARD_LOCK_TYPE_NCK = 4;
const unsigned long CARD_LOCK_TYPE_NCK1 = 5;
const unsigned long CARD_LOCK_TYPE_NCK2 = 6;
const unsigned long CARD_LOCK_TYPE_HNCK = 7;
const unsigned long CARD_LOCK_TYPE_CCK = 8;
const unsigned long CARD_LOCK_TYPE_SPCK = 9;
const unsigned long CARD_LOCK_TYPE_RCCK = 10;
const unsigned long CARD_LOCK_TYPE_RSPCK = 11;
const unsigned long CARD_LOCK_TYPE_NCK_PUK = 12;
const unsigned long CARD_LOCK_TYPE_NCK1_PUK = 13;
const unsigned long CARD_LOCK_TYPE_NCK2_PUK = 14;
const unsigned long CARD_LOCK_TYPE_HNCK_PUK = 15;
const unsigned long CARD_LOCK_TYPE_CCK_PUK = 16;
const unsigned long CARD_LOCK_TYPE_SPCK_PUK = 17;
const unsigned long CARD_LOCK_TYPE_RCCK_PUK = 18;
const unsigned long CARD_LOCK_TYPE_RSPCK_PUK = 19;
const unsigned long CARD_LOCK_TYPE_FDN = 20;
const unsigned long CARD_LOCK_TYPE_NSCK = 5;
const unsigned long CARD_LOCK_TYPE_NCK1 = 6;
const unsigned long CARD_LOCK_TYPE_NCK2 = 7;
const unsigned long CARD_LOCK_TYPE_HNCK = 8;
const unsigned long CARD_LOCK_TYPE_CCK = 9;
const unsigned long CARD_LOCK_TYPE_SPCK = 10;
const unsigned long CARD_LOCK_TYPE_PCK = 11;
const unsigned long CARD_LOCK_TYPE_RCCK = 12;
const unsigned long CARD_LOCK_TYPE_RSPCK = 13;
const unsigned long CARD_LOCK_TYPE_NCK_PUK = 14;
const unsigned long CARD_LOCK_TYPE_NSCK_PUK = 15;
const unsigned long CARD_LOCK_TYPE_NCK1_PUK = 16;
const unsigned long CARD_LOCK_TYPE_NCK2_PUK = 17;
const unsigned long CARD_LOCK_TYPE_HNCK_PUK = 18;
const unsigned long CARD_LOCK_TYPE_CCK_PUK = 19;
const unsigned long CARD_LOCK_TYPE_SPCK_PUK = 20;
const unsigned long CARD_LOCK_TYPE_PCK_PUK = 21;
const unsigned long CARD_LOCK_TYPE_RCCK_PUK = 22;
const unsigned long CARD_LOCK_TYPE_RSPCK_PUK = 23;
const unsigned long CARD_LOCK_TYPE_FDN = 24;
// MUST match with enum IccContactType in MozIcc.webidl
const unsigned long CARD_CONTACT_TYPE_ADN = 0;
@ -128,6 +132,9 @@ interface nsIIccProvider : nsISupports
const unsigned long CARD_MVNO_TYPE_SPN = 1;
const unsigned long CARD_MVNO_TYPE_GID = 2;
// MUST match with enum IccService in MozIcc.webidl
const unsigned long CARD_SERVICE_FDN = 0;
/**
* Called when a content process registers receiving unsolicited messages from
* RadioInterfaceLayer in the chrome process. Only a content process that has
@ -239,4 +246,8 @@ interface nsIIccProvider : nsISupports
in nsIDOMWindow window,
in unsigned long mvnoType,
in DOMString mvnoData);
nsISupports getServiceState(in unsigned long clientId,
in nsIDOMWindow window,
in unsigned long service);
};

View File

@ -31,3 +31,4 @@ qemu = true
[test_icc_access_invalid_object.js]
[test_icc_detected_undetected_event.js]
[test_icc_match_mvno.js]
[test_icc_service_state.js]

View File

@ -0,0 +1,28 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = "head.js";
function testUnsupportedService() {
try {
icc.getServiceState("unsupported-service");
ok(false, "should get exception");
} catch (aException) {
ok(true, "got exception: " + aException);
}
}
// Start tests
startTestCommon(function() {
let icc = getMozIcc();
// Check fdn service state
return icc.getServiceState("fdn")
.then((aResult) => {
is(aResult, true, "check fdn service state");
})
// Test unsupported service
.then(() => testUnsupportedService());
});

View File

@ -5210,7 +5210,7 @@ public:
void
NoteBackgroundThread(nsIEventTarget* aBackgroundThread);
NS_INLINE_DECL_REFCOUNTING(QuotaClient)
NS_INLINE_DECL_REFCOUNTING(QuotaClient, MOZ_OVERRIDE)
virtual mozilla::dom::quota::Client::Type
GetType() MOZ_OVERRIDE;

View File

@ -65,6 +65,9 @@ public:
// Can be called on any thread.
virtual void NotifyDecodedFrames(uint32_t aParsed, uint32_t aDecoded) = 0;
// For decoders with a notion of timestamp offset, returns the value in microseconds.
virtual int64_t GetTimestampOffset() const { return 0; }
// Return the duration of the media in microseconds.
virtual int64_t GetMediaDuration() = 0;

View File

@ -26,6 +26,13 @@ namespace mozilla {
#define ENCODER_CONFIG_FRAME_RATE 30 // fps
#define GET_ENCODED_VIDEO_FRAME_TIMEOUT 100000 // microseconds
OmxVideoTrackEncoder::OmxVideoTrackEncoder()
: VideoTrackEncoder()
{}
OmxVideoTrackEncoder::~OmxVideoTrackEncoder()
{}
nsresult
OmxVideoTrackEncoder::Init(int aWidth, int aHeight, int aDisplayWidth,
int aDisplayHeight, TrackRate aTrackRate)
@ -162,6 +169,13 @@ OmxVideoTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData)
return NS_OK;
}
OmxAudioTrackEncoder::OmxAudioTrackEncoder()
: AudioTrackEncoder()
{}
OmxAudioTrackEncoder::~OmxAudioTrackEncoder()
{}
nsresult
OmxAudioTrackEncoder::AppendEncodedFrames(EncodedFrameContainer& aContainer)
{

View File

@ -26,9 +26,8 @@ namespace mozilla {
class OmxVideoTrackEncoder: public VideoTrackEncoder
{
public:
OmxVideoTrackEncoder()
: VideoTrackEncoder()
{}
OmxVideoTrackEncoder();
~OmxVideoTrackEncoder();
already_AddRefed<TrackMetadataBase> GetMetadata() MOZ_OVERRIDE;
@ -46,9 +45,8 @@ private:
class OmxAudioTrackEncoder : public AudioTrackEncoder
{
public:
OmxAudioTrackEncoder()
: AudioTrackEncoder()
{}
OmxAudioTrackEncoder();
~OmxAudioTrackEncoder();
already_AddRefed<TrackMetadataBase> GetMetadata() = 0;

View File

@ -157,7 +157,7 @@ MP4Reader::Init(MediaDecoderReader* aCloneDonor)
{
MOZ_ASSERT(NS_IsMainThread(), "Must be on main thread.");
PlatformDecoderModule::Init();
mDemuxer = new MP4Demuxer(new MP4Stream(mDecoder->GetResource(), &mDemuxerMonitor), &mDemuxerMonitor);
mDemuxer = new MP4Demuxer(new MP4Stream(mDecoder->GetResource(), &mDemuxerMonitor), GetDecoder()->GetTimestampOffset(), &mDemuxerMonitor);
InitLayersBackendType();

View File

@ -38,7 +38,7 @@ public:
return NS_OK;
}
virtual nsresult ReadAt(int64_t aOffset, char* aBuffer, uint32_t aCount,
uint32_t* aBytes);
uint32_t* aBytes) MOZ_OVERRIDE;
virtual nsresult Seek(int32_t aWhence, int64_t aOffset) MOZ_OVERRIDE
{
return NS_OK;
@ -57,7 +57,7 @@ public:
virtual bool IsSuspendedByCache() MOZ_OVERRIDE { return false; }
virtual bool IsSuspended() MOZ_OVERRIDE { return false; }
virtual nsresult ReadFromCache(char* aBuffer, int64_t aOffset,
uint32_t aCount)
uint32_t aCount) MOZ_OVERRIDE
{
return NS_OK;
}

View File

@ -24,7 +24,7 @@ public:
explicit MP4DemuxerBinding(const char* aFileName = "dash_dashinit.mp4")
: resource(new MockMediaResource(aFileName))
, mMonitor("TestMP4Demuxer monitor")
, demuxer(new MP4Demuxer(new MP4Stream(resource, &mMonitor), &mMonitor))
, demuxer(new MP4Demuxer(new MP4Stream(resource, &mMonitor), 0, &mMonitor))
{
EXPECT_EQ(NS_OK, resource->Open(nullptr));
}

View File

@ -237,8 +237,8 @@ public:
return false;
}
return aData[4] == 'm' && aData[5] == 'o' && aData[6] == 'o' &&
aData[7] == 'f';
return (aData[4] == 'm' && aData[5] == 'o' && aData[6] == 'o' && aData[7] == 'f') ||
(aData[4] == 's' && aData[5] == 't' && aData[6] == 'y' && aData[7] == 'p');
}
bool ParseStartAndEndTimestamps(const uint8_t* aData, uint32_t aLength,
@ -249,7 +249,11 @@ public:
bool initSegment = IsInitSegmentPresent(aData, aLength);
if (initSegment) {
mStream = new mp4_demuxer::BufferStream();
mParser = new mp4_demuxer::MoofParser(mStream, 0, &mMonitor);
// We use a timestampOffset of 0 for ContainerParser, and require
// consumers of ParseStartAndEndTimestamps to add their timestamp offset
// manually. This allows the ContainerParser to be shared across different
// timestampOffsets.
mParser = new mp4_demuxer::MoofParser(mStream, 0, 0, &mMonitor);
} else if (!mStream || !mParser) {
return false;
}

View File

@ -19,10 +19,14 @@
#include "mozilla/dom/TimeRanges.h"
#include "mozilla/mozalloc.h"
#include "nsContentTypeParser.h"
#include "nsContentUtils.h"
#include "nsDebug.h"
#include "nsError.h"
#include "nsIEffectiveTLDService.h"
#include "nsIRunnable.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsIURI.h"
#include "nsNetCID.h"
#include "nsPIDOMWindow.h"
#include "nsString.h"
#include "nsThreadUtils.h"
@ -306,6 +310,49 @@ MediaSource::IsTypeSupported(const GlobalObject&, const nsAString& aType)
return NS_SUCCEEDED(rv);
}
/* static */ bool
MediaSource::Enabled(JSContext* cx, JSObject* aGlobal)
{
MOZ_ASSERT(NS_IsMainThread());
// Don't use aGlobal across Preferences stuff, which the static
// analysis thinks can GC.
JS::Rooted<JSObject*> global(cx, aGlobal);
bool enabled = Preferences::GetBool("media.mediasource.enabled");
if (!enabled) {
return false;
}
// Check whether it's enabled everywhere or just YouTube.
bool restrict = Preferences::GetBool("media.mediasource.youtubeonly", false);
if (!restrict) {
return true;
}
// We want to restrict to YouTube only. We define that as the
// origin being https://*.youtube.com.
nsIPrincipal* principal = nsContentUtils::ObjectPrincipal(global);
nsCOMPtr<nsIURI> uri;
if (NS_FAILED(principal->GetURI(getter_AddRefs(uri))) || !uri) {
return false;
}
bool isHttps = false;
if (NS_FAILED(uri->SchemeIs("https", &isHttps)) || !isHttps) {
return false;
}
nsCOMPtr<nsIEffectiveTLDService> tldServ =
do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID);
NS_ENSURE_TRUE(tldServ, false);
nsAutoCString eTLDplusOne;
return
NS_SUCCEEDED(tldServ->GetBaseDomain(uri, 0, eTLDplusOne)) &&
eTLDplusOne.EqualsLiteral("youtube.com");
}
bool
MediaSource::Attach(MediaSourceDecoder* aDecoder)
{

View File

@ -60,6 +60,8 @@ public:
void EndOfStream(const Optional<MediaSourceEndOfStreamError>& aError, ErrorResult& aRv);
static bool IsTypeSupported(const GlobalObject&, const nsAString& aType);
static bool Enabled(JSContext* cx, JSObject* aGlobal);
/** End WebIDL Methods. */
NS_DECL_ISUPPORTS_INHERITED

View File

@ -129,10 +129,10 @@ MediaSourceDecoder::DetachMediaSource()
}
already_AddRefed<SourceBufferDecoder>
MediaSourceDecoder::CreateSubDecoder(const nsACString& aType)
MediaSourceDecoder::CreateSubDecoder(const nsACString& aType, int64_t aTimestampOffset)
{
MOZ_ASSERT(mReader);
return mReader->CreateSubDecoder(aType);
return mReader->CreateSubDecoder(aType, aTimestampOffset);
}
void

View File

@ -46,7 +46,8 @@ public:
void AttachMediaSource(dom::MediaSource* aMediaSource);
void DetachMediaSource();
already_AddRefed<SourceBufferDecoder> CreateSubDecoder(const nsACString& aType);
already_AddRefed<SourceBufferDecoder> CreateSubDecoder(const nsACString& aType,
int64_t aTimestampOffset /* microseconds */);
void AddTrackBuffer(TrackBuffer* aTrackBuffer);
void RemoveTrackBuffer(TrackBuffer* aTrackBuffer);
void OnTrackBufferConfigured(TrackBuffer* aTrackBuffer, const MediaInfo& aInfo);

View File

@ -457,14 +457,14 @@ CreateReaderForType(const nsACString& aType, AbstractMediaDecoder* aDecoder)
}
already_AddRefed<SourceBufferDecoder>
MediaSourceReader::CreateSubDecoder(const nsACString& aType)
MediaSourceReader::CreateSubDecoder(const nsACString& aType, int64_t aTimestampOffset)
{
if (IsShutdown()) {
return nullptr;
}
MOZ_ASSERT(GetTaskQueue());
nsRefPtr<SourceBufferDecoder> decoder =
new SourceBufferDecoder(new SourceBufferResource(aType), mDecoder);
new SourceBufferDecoder(new SourceBufferResource(aType), mDecoder, aTimestampOffset);
nsRefPtr<MediaDecoderReader> reader(CreateReaderForType(aType, decoder));
if (!reader) {
return nullptr;

View File

@ -99,7 +99,8 @@ public:
// Acquires the decoder monitor, and is thus callable on any thread.
nsresult GetBuffered(dom::TimeRanges* aBuffered) MOZ_OVERRIDE;
already_AddRefed<SourceBufferDecoder> CreateSubDecoder(const nsACString& aType);
already_AddRefed<SourceBufferDecoder> CreateSubDecoder(const nsACString& aType,
int64_t aTimestampOffset /* microseconds */);
void AddTrackBuffer(TrackBuffer* aTrackBuffer);
void RemoveTrackBuffer(TrackBuffer* aTrackBuffer);

View File

@ -335,7 +335,9 @@ SourceBuffer::AppendData(const uint8_t* aData, uint32_t aLength, ErrorResult& aR
}
StartUpdating();
if (!mTrackBuffer->AppendData(aData, aLength)) {
MOZ_ASSERT(mAppendMode == SourceBufferAppendMode::Segments,
"We don't handle timestampOffset for sequence mode yet");
if (!mTrackBuffer->AppendData(aData, aLength, mTimestampOffset * USECS_PER_S)) {
Optional<MediaSourceEndOfStreamError> decodeError(MediaSourceEndOfStreamError::Decode);
ErrorResult dummy;
mMediaSource->EndOfStream(decodeError, dummy);

Some files were not shown because too many files have changed in this diff Show More