зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to fx-team a=merge
This commit is contained in:
Коммит
e7abc3e482
|
@ -15,9 +15,9 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<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"/>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<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="a47dd04f8f66e42fd331711140f2c3e2fed0767d"/>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
</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="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0870da2b5a71b6f48be8222e3f056498fea66e10"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
|
@ -134,7 +134,7 @@
|
|||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c5f8d282efe4a4e8b1e31a37300944e338e60e4f"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9f28c4faea3b2f01db227b2467b08aeba96d9bec"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="7e257a260fb6a6c3811f9c396cfe3ccf191241f6"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="b06bb64646c5a109856ad461ac91336f8edc2579"/>
|
||||
<project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
|
||||
<project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
|
||||
</manifest>
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<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"/>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<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="a47dd04f8f66e42fd331711140f2c3e2fed0767d"/>
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<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"/>
|
||||
|
@ -153,7 +153,7 @@
|
|||
<project name="platform/hardware/ril" path="hardware/ril" revision="12b1977cc704b35f2e9db2bb423fa405348bc2f3"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="985bf15264d865fe7b9c5b45f61c451cbaafa43d"/>
|
||||
<project name="platform/system/core" path="system/core" revision="350eac5403124dacb2a5fd9e28ac290a59fc3b8e"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="7e257a260fb6a6c3811f9c396cfe3ccf191241f6"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="b06bb64646c5a109856ad461ac91336f8edc2579"/>
|
||||
<project name="platform/system/qcom" path="system/qcom" revision="63e3f6f176caad587d42bba4c16b66d953fb23c2"/>
|
||||
<project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="d8952a42771045fca73ec600e2b42a4c7129d723"/>
|
||||
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="018b44e52b2bac5d3631d559550e88a4b68c6e67"/>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
</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="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0870da2b5a71b6f48be8222e3f056498fea66e10"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
|
@ -145,7 +145,7 @@
|
|||
<project name="platform/hardware/ril" path="hardware/ril" revision="c4e2ac95907a5519a0e09f01a0d8e27fec101af0"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="e1eb226fa3ad3874ea7b63c56a9dc7012d7ff3c2"/>
|
||||
<project name="platform/system/core" path="system/core" revision="adc485d8755af6a61641d197de7cfef667722580"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="7e257a260fb6a6c3811f9c396cfe3ccf191241f6"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="b06bb64646c5a109856ad461ac91336f8edc2579"/>
|
||||
<project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
|
||||
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4ae5df252123591d5b941191790e7abed1bce5a4"/>
|
||||
<project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="ce18b47b4a4f93a581d672bbd5cb6d12fe796ca9"/>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "8f61e7de9914bb7f66ac2faf0bc256dda628a679",
|
||||
"revision": "8879d60a0cc3d69720c7335370d29d5a44523d0c",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,8 +17,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="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<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="0870da2b5a71b6f48be8222e3f056498fea66e10"/>
|
||||
|
|
|
@ -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="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<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"/>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
</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="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0870da2b5a71b6f48be8222e3f056498fea66e10"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
|
@ -129,7 +129,7 @@
|
|||
<project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
|
||||
<project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="7e257a260fb6a6c3811f9c396cfe3ccf191241f6"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="b06bb64646c5a109856ad461ac91336f8edc2579"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>
|
||||
|
|
|
@ -17,8 +17,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="3b4c64b5a05d106568dae3f88d38bdbb3d5bc29e"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="45c54a55e31758f7e54e5eafe0d01d387f35897a"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e5d666d6f62480ced56c6d9352f5e12befb5a862"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
|
||||
<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"/>
|
||||
|
|
|
@ -121,7 +121,7 @@ static bool IsArg(const char* arg, const char* s)
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
#if defined(XP_WIN) && defined(MOZ_METRO)
|
||||
/*
|
||||
* AttachToTestHarness - Windows helper for when we are running
|
||||
* in the immersive environment. Firefox is launched by Windows in
|
||||
|
|
76
configure.in
76
configure.in
|
@ -2212,7 +2212,7 @@ ia64*-hpux*)
|
|||
if test "$CPU_ARCH" = "x86"; then
|
||||
WIN32_SUBSYSTEM_VERSION=5.01
|
||||
else
|
||||
WIN32_SUBSYSTEM_VERSION=5.02
|
||||
WIN32_SUBSYSTEM_VERSION=6.01
|
||||
fi
|
||||
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
|
||||
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
|
||||
|
@ -5935,53 +5935,57 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
|
|||
######################################
|
||||
# Find _43 for use by XP.
|
||||
|
||||
# Get the SDK path from the registry.
|
||||
# First try to get the June 2010 SDK
|
||||
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK (June 2010)' | head -n 1`
|
||||
if test -z "$MOZ_DIRECTX_SDK_REG_KEY" ; then
|
||||
# Otherwise just take whatever comes first
|
||||
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK' | head -n 1`
|
||||
fi
|
||||
MOZ_DIRECTX_SDK_PATH=`reg query "$MOZ_DIRECTX_SDK_REG_KEY" //v InstallPath | grep REG_SZ | sed 's/.*\([[a-zA-Z]]\)\\:\\\\/\\1\\:\\\\/' | sed 's,\\\\,/,g'`
|
||||
|
||||
if test -n "$MOZ_DIRECTX_SDK_PATH" &&
|
||||
test -f "$MOZ_DIRECTX_SDK_PATH"/lib/$MOZ_D3D_CPU_SUFFIX/dxguid.lib ; then
|
||||
AC_MSG_RESULT([Found DirectX SDK via registry, using $MOZ_DIRECTX_SDK_PATH])
|
||||
if test "$HAVE_64BIT_BUILD"; then
|
||||
AC_MSG_RESULT([We are building a 64-bit binary, skip checking d3dcompiler_43.])
|
||||
else
|
||||
AC_MSG_RESULT([DirectX SDK not found.])
|
||||
MOZ_DIRECTX_SDK_PATH=
|
||||
fi
|
||||
# Get the SDK path from the registry.
|
||||
# First try to get the June 2010 SDK
|
||||
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK (June 2010)' | head -n 1`
|
||||
if test -z "$MOZ_DIRECTX_SDK_REG_KEY" ; then
|
||||
# Otherwise just take whatever comes first
|
||||
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK' | head -n 1`
|
||||
fi
|
||||
MOZ_DIRECTX_SDK_PATH=`reg query "$MOZ_DIRECTX_SDK_REG_KEY" //v InstallPath | grep REG_SZ | sed 's/.*\([[a-zA-Z]]\)\\:\\\\/\\1\\:\\\\/' | sed 's,\\\\,/,g'`
|
||||
|
||||
# Check that our DirectX SDK is acceptable.
|
||||
if test -n "$MOZ_DIRECTX_SDK_PATH"; then
|
||||
if test -n "`echo $MOZ_DIRECTX_SDK_REG_KEY | grep 'February 2010'`" ; then
|
||||
AC_MSG_RESULT([Found the February 2010 DirectX SDK, which is unacceptable to ANGLE.])
|
||||
if test -n "$MOZ_DIRECTX_SDK_PATH" &&
|
||||
test -f "$MOZ_DIRECTX_SDK_PATH"/lib/$MOZ_D3D_CPU_SUFFIX/dxguid.lib ; then
|
||||
AC_MSG_RESULT([Found DirectX SDK via registry, using $MOZ_DIRECTX_SDK_PATH])
|
||||
else
|
||||
AC_MSG_RESULT([DirectX SDK not found.])
|
||||
MOZ_DIRECTX_SDK_PATH=
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_DIRECTX_SDK_PATH"; then
|
||||
# Find a D3D compiler DLL in the DirectX SDK, if we didn't find one already.
|
||||
# Get the SDK numeric version (e.g. 43) by looking at the dependencies of d3dx9.lib
|
||||
MOZ_D3DX9_VERSION=`dumpbin //headers "$MOZ_DIRECTX_SDK_PATH"/lib/$MOZ_D3D_CPU_SUFFIX/d3dx9.lib | egrep d3dx9_[[0-9]][[0-9]]\.dll | head -n1 | sed 's/.*\([[0-9]][[0-9]]\).*/\\1/g'`
|
||||
# Check that our DirectX SDK is acceptable.
|
||||
if test -n "$MOZ_DIRECTX_SDK_PATH"; then
|
||||
if test -n "`echo $MOZ_DIRECTX_SDK_REG_KEY | grep 'February 2010'`" ; then
|
||||
AC_MSG_RESULT([Found the February 2010 DirectX SDK, which is unacceptable to ANGLE.])
|
||||
MOZ_DIRECTX_SDK_PATH=
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$MOZ_D3DX9_VERSION" ; then
|
||||
MOZ_D3DCOMPILER_XP_CAB=`find "$MOZ_DIRECTX_SDK_PATH"/Redist -name *D3DCompiler_${MOZ_D3DX9_VERSION}_${MOZ_D3D_CPU_SUFFIX}.cab | head -n1`
|
||||
if test -n "$MOZ_DIRECTX_SDK_PATH"; then
|
||||
# Find a D3D compiler DLL in the DirectX SDK, if we didn't find one already.
|
||||
# Get the SDK numeric version (e.g. 43) by looking at the dependencies of d3dx9.lib
|
||||
MOZ_D3DX9_VERSION=`dumpbin //headers "$MOZ_DIRECTX_SDK_PATH"/lib/$MOZ_D3D_CPU_SUFFIX/d3dx9.lib | egrep d3dx9_[[0-9]][[0-9]]\.dll | head -n1 | sed 's/.*\([[0-9]][[0-9]]\).*/\\1/g'`
|
||||
|
||||
if test -n "$MOZ_D3DCOMPILER_XP_CAB"; then
|
||||
MOZ_D3DCOMPILER_XP_DLL=D3DCompiler_$MOZ_D3DX9_VERSION.dll
|
||||
if test -n "$MOZ_D3DX9_VERSION" ; then
|
||||
MOZ_D3DCOMPILER_XP_CAB=`find "$MOZ_DIRECTX_SDK_PATH"/Redist -name *D3DCompiler_${MOZ_D3DX9_VERSION}_${MOZ_D3D_CPU_SUFFIX}.cab | head -n1`
|
||||
|
||||
if test -n "$MOZ_D3DCOMPILER_XP_CAB"; then
|
||||
MOZ_D3DCOMPILER_XP_DLL=D3DCompiler_$MOZ_D3DX9_VERSION.dll
|
||||
else
|
||||
AC_MSG_RESULT([Couldn't find a CAB containing the D3D compiler DLL.])
|
||||
AC_MSG_ERROR([DirectX SDK at "$MOZ_DIRECTX_SDK_PATH" appears broken.])
|
||||
MOZ_DIRECTX_SDK_PATH=
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([Couldn't find a CAB containing the D3D compiler DLL.])
|
||||
AC_MSG_ERROR([DirectX SDK at "$MOZ_DIRECTX_SDK_PATH" appears broken.])
|
||||
AC_MSG_RESULT([Couldn't determine the D3DX9 version for the DirectX SDK.])
|
||||
MOZ_DIRECTX_SDK_PATH=
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([Couldn't determine the D3DX9 version for the DirectX SDK.])
|
||||
MOZ_DIRECTX_SDK_PATH=
|
||||
AC_MSG_RESULT([Couldn't find an acceptable DirectX SDK for ANGLE, needed for d3dcompiler_43.])
|
||||
AC_MSG_RESULT([ Either ignore, install DirectX SDK (June 2010 version or newer), or reconfigure with --disable-webgl.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([Couldn't find an acceptable DirectX SDK for ANGLE, needed for d3dcompiler_43.])
|
||||
AC_MSG_RESULT([ Either ignore, install DirectX SDK (June 2010 version or newer), or reconfigure with --disable-webgl.])
|
||||
fi
|
||||
|
||||
######################################
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
<html>
|
||||
<body>
|
||||
<q>
|
||||
<form>
|
||||
<fieldset>
|
||||
<input>
|
||||
<input>
|
||||
</fieldset>
|
||||
</form>
|
||||
<p>
|
||||
<div><span>
|
||||
<img>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><map><map><map><map><map><map><map><map><map>
|
||||
<map><map><map><area><area><area><area><area><area></map>
|
||||
<hgroup>
|
||||
<object>
|
||||
<form dir="auto">
|
||||
<keygen dir="auto">
|
||||
</keygen>
|
||||
</form>
|
||||
<input>
|
||||
<input>
|
||||
</form>
|
||||
<script>
|
||||
function boom(){
|
||||
location.reload()
|
||||
}
|
||||
setInterval('boom()', 2000)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -9593,7 +9593,22 @@ nsDocument::MaybePreLoadImage(nsIURI* uri, const nsAString &aCrossOriginAttr,
|
|||
// the "real" load occurs. Unpinned in DispatchContentLoadedEvents and
|
||||
// unlink
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mPreloadingImages.AppendObject(request);
|
||||
mPreloadingImages.Put(uri, request.forget());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::ForgetImagePreload(nsIURI* aURI)
|
||||
{
|
||||
// Checking count is faster than hashing the URI in the common
|
||||
// case of empty table.
|
||||
if (mPreloadingImages.Count() != 0) {
|
||||
nsCOMPtr<imgIRequest> req;
|
||||
mPreloadingImages.Remove(aURI, getter_AddRefs(req));
|
||||
if (req) {
|
||||
// Make sure to cancel the request so imagelib knows it's gone.
|
||||
req->CancelAndForgetObserver(NS_BINDING_ABORTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1094,6 +1094,7 @@ public:
|
|||
virtual void MaybePreLoadImage(nsIURI* uri,
|
||||
const nsAString &aCrossOriginAttr,
|
||||
ReferrerPolicy aReferrerPolicy) MOZ_OVERRIDE;
|
||||
virtual void ForgetImagePreload(nsIURI* aURI) MOZ_OVERRIDE;
|
||||
|
||||
virtual void PreloadStyle(nsIURI* uri, const nsAString& charset,
|
||||
const nsAString& aCrossOriginAttr,
|
||||
|
@ -1742,8 +1743,11 @@ private:
|
|||
|
||||
nsExternalResourceMap mExternalResourceMap;
|
||||
|
||||
// All images in process of being preloaded
|
||||
nsCOMArray<imgIRequest> mPreloadingImages;
|
||||
// All images in process of being preloaded. This is a hashtable so
|
||||
// we can remove them as the real image loads start; that way we
|
||||
// make sure to not keep the image load going when no one cares
|
||||
// about it anymore.
|
||||
nsRefPtrHashtable<nsURIHashKey, imgIRequest> mPreloadingImages;
|
||||
|
||||
nsRefPtr<mozilla::dom::DOMImplementation> mDOMImplementation;
|
||||
|
||||
|
|
|
@ -146,8 +146,8 @@ struct FullScreenOptions {
|
|||
} // namespace mozilla
|
||||
|
||||
#define NS_IDOCUMENT_IID \
|
||||
{ 0x1f343423, 0x957c, 0x4da3, \
|
||||
{ 0xaa, 0xa3, 0x07, 0x37, 0x54, 0x3e, 0x79, 0x2a } }
|
||||
{ 0xf63d2f6e, 0xd1c1, 0x49b9, \
|
||||
{ 0x88, 0x26, 0xd5, 0x9e, 0x5d, 0x72, 0x2a, 0x42 } }
|
||||
|
||||
// Enum for requesting a particular type of document when creating a doc
|
||||
enum DocumentFlavor {
|
||||
|
@ -1922,6 +1922,12 @@ public:
|
|||
const nsAString& aCrossOriginAttr,
|
||||
ReferrerPolicy aReferrerPolicy) = 0;
|
||||
|
||||
/**
|
||||
* Called by images to forget an image preload when they start doing
|
||||
* the real load.
|
||||
*/
|
||||
virtual void ForgetImagePreload(nsIURI* aURI) = 0;
|
||||
|
||||
/**
|
||||
* Called by nsParser to preload style sheets. Can also be merged into the
|
||||
* parser if and when the parser is merged with libgklayout. aCrossOriginAttr
|
||||
|
|
|
@ -893,6 +893,11 @@ nsImageLoadingContent::LoadImage(nsIURI* aNewURI,
|
|||
getter_AddRefs(req),
|
||||
policyType);
|
||||
|
||||
// Tell the document to forget about the image preload, if any, for
|
||||
// this URI, now that we might have another imgRequestProxy for it.
|
||||
// That way if we get canceled later the image load won't continue.
|
||||
aDocument->ForgetImagePreload(aNewURI);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
TrackImage(req);
|
||||
ResetAnimationIfNeeded();
|
||||
|
|
|
@ -459,7 +459,7 @@ CreateInterfaceObject(JSContext* cx, JS::Handle<JSObject*> global,
|
|||
}
|
||||
|
||||
if (!JS_DefineProperty(cx, constructor, "length", ctorNargs,
|
||||
JSPROP_READONLY | JSPROP_PERMANENT)) {
|
||||
JSPROP_READONLY)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -2089,7 +2089,9 @@ ConstructJSImplementation(JSContext* aCx, const char* aContractId,
|
|||
nsresult rv;
|
||||
nsCOMPtr<nsISupports> implISupports = do_CreateInstance(aContractId, &rv);
|
||||
if (!implISupports) {
|
||||
NS_WARNING("Failed to get JS implementation for contract");
|
||||
nsPrintfCString msg("Failed to get JS implementation for contract \"%s\"",
|
||||
aContractId);
|
||||
NS_WARNING(msg.get());
|
||||
aRv.Throw(rv);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -11882,6 +11882,7 @@ class CGResolveSystemBinding(CGAbstractMethod):
|
|||
def definition_body(self):
|
||||
descriptors = self.config.getDescriptors(hasInterfaceObject=True,
|
||||
isExposedInSystemGlobals=True,
|
||||
workers=False,
|
||||
register=True,
|
||||
skipGen=False)
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,412 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_dom_bluetooth_bluetoothdaemonhandsfreeinterface_h
|
||||
#define mozilla_dom_bluetooth_bluetoothdaemonhandsfreeinterface_h
|
||||
|
||||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
class BluetoothSetupResultHandler;
|
||||
|
||||
class BluetoothDaemonHandsfreeModule
|
||||
{
|
||||
public:
|
||||
enum {
|
||||
SERVICE_ID = 0x05
|
||||
};
|
||||
|
||||
enum {
|
||||
OPCODE_ERROR = 0x00,
|
||||
OPCODE_CONNECT = 0x01,
|
||||
OPCODE_DISCONNECT = 0x02,
|
||||
OPCODE_CONNECT_AUDIO = 0x03,
|
||||
OPCODE_DISCONNECT_AUDIO = 0x04,
|
||||
OPCODE_START_VOICE_RECOGNITION = 0x05,
|
||||
OPCODE_STOP_VOICE_RECOGNITION =0x06,
|
||||
OPCODE_VOLUME_CONTROL = 0x07,
|
||||
OPCODE_DEVICE_STATUS_NOTIFICATION = 0x08,
|
||||
OPCODE_COPS_RESPONSE = 0x09,
|
||||
OPCODE_CIND_RESPONSE = 0x0a,
|
||||
OPCODE_FORMATTED_AT_RESPONSE = 0x0b,
|
||||
OPCODE_AT_RESPONSE = 0x0c,
|
||||
OPCODE_CLCC_RESPONSE = 0x0d,
|
||||
OPCODE_PHONE_STATE_CHANGE = 0x0e
|
||||
};
|
||||
|
||||
virtual nsresult Send(BluetoothDaemonPDU* aPDU, void* aUserData) = 0;
|
||||
|
||||
virtual nsresult RegisterModule(uint8_t aId, uint8_t aMode,
|
||||
BluetoothSetupResultHandler* aRes) = 0;
|
||||
|
||||
virtual nsresult UnregisterModule(uint8_t aId,
|
||||
BluetoothSetupResultHandler* aRes) = 0;
|
||||
|
||||
void SetNotificationHandler(
|
||||
BluetoothHandsfreeNotificationHandler* aNotificationHandler);
|
||||
|
||||
//
|
||||
// Commands
|
||||
//
|
||||
|
||||
nsresult ConnectCmd(const nsAString& aBdAddr,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
nsresult DisconnectCmd(const nsAString& aBdAddr,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
nsresult ConnectAudioCmd(const nsAString& aBdAddr,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
nsresult DisconnectAudioCmd(const nsAString& aBdAddr,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Voice Recognition */
|
||||
|
||||
nsresult StartVoiceRecognitionCmd(BluetoothHandsfreeResultHandler* aRes);
|
||||
nsresult StopVoiceRecognitionCmd(BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Volume */
|
||||
|
||||
nsresult VolumeControlCmd(BluetoothHandsfreeVolumeType aType, int aVolume,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Device status */
|
||||
|
||||
nsresult DeviceStatusNotificationCmd(
|
||||
BluetoothHandsfreeNetworkState aNtkState,
|
||||
BluetoothHandsfreeServiceType aSvcType,
|
||||
int aSignal, int aBattChg,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Responses */
|
||||
|
||||
nsresult CopsResponseCmd(const char* aCops,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
nsresult CindResponseCmd(int aSvc, int aNumActive, int aNumHeld,
|
||||
BluetoothHandsfreeCallState aCallSetupState,
|
||||
int aSignal, int aRoam, int aBattChg,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
nsresult FormattedAtResponseCmd(const char* aRsp,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
nsresult AtResponseCmd(BluetoothHandsfreeAtResponse aResponseCode,
|
||||
int aErrorCode,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
nsresult ClccResponseCmd(int aIndex, BluetoothHandsfreeCallDirection aDir,
|
||||
BluetoothHandsfreeCallState aState,
|
||||
BluetoothHandsfreeCallMode aMode,
|
||||
BluetoothHandsfreeCallMptyType aMpty,
|
||||
const nsAString& aNumber,
|
||||
BluetoothHandsfreeCallAddressType aType,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Phone State */
|
||||
|
||||
nsresult PhoneStateChangeCmd(int aNumActive, int aNumHeld,
|
||||
BluetoothHandsfreeCallState aCallSetupState,
|
||||
const nsAString& aNumber,
|
||||
BluetoothHandsfreeCallAddressType aType,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
protected:
|
||||
nsresult Send(BluetoothDaemonPDU* aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void HandleSvc(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU, void* aUserData);
|
||||
|
||||
//
|
||||
// Responses
|
||||
//
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothHandsfreeResultHandler, void>
|
||||
ResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothHandsfreeResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>
|
||||
ErrorRunnable;
|
||||
|
||||
void ErrorRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void ConnectRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void DisconnectRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void ConnectAudioRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void DisconnectAudioRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void StartVoiceRecognitionRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void StopVoiceRecognitionRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void VolumeControlRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void DeviceStatusNotificationRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void CopsResponseRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void CindResponseRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void FormattedAtResponseRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void AtResponseRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void ClccResponseRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void PhoneStateChangeRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
void HandleRsp(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
void* aUserData);
|
||||
|
||||
//
|
||||
// Notifications
|
||||
//
|
||||
|
||||
class NotificationHandlerWrapper;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeConnectionState,
|
||||
nsString,
|
||||
BluetoothHandsfreeConnectionState,
|
||||
const nsAString&>
|
||||
ConnectionStateNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeAudioState,
|
||||
nsString,
|
||||
BluetoothHandsfreeAudioState,
|
||||
const nsAString&>
|
||||
AudioStateNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeVoiceRecognitionState>
|
||||
VoiceRecognitionNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
AnswerCallNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
HangupCallNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeVolumeType, int>
|
||||
VolumeNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsString, const nsAString&>
|
||||
DialCallNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
char>
|
||||
DtmfNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeNRECState>
|
||||
NRECNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeCallHoldType>
|
||||
CallHoldNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
CnumNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
CindNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
CopsNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
ClccNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsCString, const nsACString&>
|
||||
UnknownAtNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
KeyPressedNotification;
|
||||
|
||||
class AudioStateInitOp;
|
||||
class ConnectionStateInitOp;
|
||||
class DialCallInitOp;
|
||||
class VolumeInitOp;
|
||||
class UnknownAtInitOp;
|
||||
|
||||
void ConnectionStateNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void AudioStateNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void VoiceRecognitionNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void AnswerCallNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void HangupCallNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void VolumeNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void DialCallNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void DtmfNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void NRECNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void CallHoldNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void CnumNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void CindNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void CopsNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void ClccNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void UnknownAtNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void KeyPressedNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU);
|
||||
|
||||
void HandleNtf(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU,
|
||||
void* aUserData);
|
||||
|
||||
static BluetoothHandsfreeNotificationHandler* sNotificationHandler;
|
||||
};
|
||||
|
||||
class BluetoothDaemonHandsfreeInterface MOZ_FINAL
|
||||
: public BluetoothHandsfreeInterface
|
||||
{
|
||||
class CleanupResultHandler;
|
||||
class InitResultHandler;
|
||||
|
||||
enum {
|
||||
MODE_HEADSET = 0x00,
|
||||
MODE_NARROWBAND_SPEECH = 0x01,
|
||||
MODE_NARRAWBAND_WIDEBAND_SPEECH = 0x02
|
||||
};
|
||||
|
||||
public:
|
||||
BluetoothDaemonHandsfreeInterface(BluetoothDaemonHandsfreeModule* aModule);
|
||||
~BluetoothDaemonHandsfreeInterface();
|
||||
|
||||
void Init(
|
||||
BluetoothHandsfreeNotificationHandler* aNotificationHandler,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
void Cleanup(BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Connect / Disconnect */
|
||||
|
||||
void Connect(const nsAString& aBdAddr,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
void Disconnect(const nsAString& aBdAddr,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
void ConnectAudio(const nsAString& aBdAddr,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
void DisconnectAudio(const nsAString& aBdAddr,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Voice Recognition */
|
||||
|
||||
void StartVoiceRecognition(BluetoothHandsfreeResultHandler* aRes);
|
||||
void StopVoiceRecognition(BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Volume */
|
||||
|
||||
void VolumeControl(BluetoothHandsfreeVolumeType aType, int aVolume,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Device status */
|
||||
|
||||
void DeviceStatusNotification(BluetoothHandsfreeNetworkState aNtkState,
|
||||
BluetoothHandsfreeServiceType aSvcType,
|
||||
int aSignal, int aBattChg,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Responses */
|
||||
|
||||
void CopsResponse(const char* aCops,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
void CindResponse(int aSvc, int aNumActive, int aNumHeld,
|
||||
BluetoothHandsfreeCallState aCallSetupState,
|
||||
int aSignal, int aRoam, int aBattChg,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
void FormattedAtResponse(const char* aRsp,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
void AtResponse(BluetoothHandsfreeAtResponse aResponseCode, int aErrorCode,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
void ClccResponse(int aIndex, BluetoothHandsfreeCallDirection aDir,
|
||||
BluetoothHandsfreeCallState aState,
|
||||
BluetoothHandsfreeCallMode aMode,
|
||||
BluetoothHandsfreeCallMptyType aMpty,
|
||||
const nsAString& aNumber,
|
||||
BluetoothHandsfreeCallAddressType aType,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
/* Phone State */
|
||||
|
||||
void PhoneStateChange(int aNumActive, int aNumHeld,
|
||||
BluetoothHandsfreeCallState aCallSetupState,
|
||||
const nsAString& aNumber,
|
||||
BluetoothHandsfreeCallAddressType aType,
|
||||
BluetoothHandsfreeResultHandler* aRes);
|
||||
|
||||
private:
|
||||
void DispatchError(BluetoothHandsfreeResultHandler* aRes,
|
||||
BluetoothStatus aStatus);
|
||||
|
||||
BluetoothDaemonHandsfreeModule* mModule;
|
||||
};
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
||||
|
||||
#endif
|
|
@ -45,6 +45,18 @@ Convert(bool aIn, BluetoothScanMode& aOut)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(int aIn, uint8_t& aOut)
|
||||
{
|
||||
if (NS_WARN_IF(aIn < std::numeric_limits<uint8_t>::min()) ||
|
||||
NS_WARN_IF(aIn > std::numeric_limits<uint8_t>::max())) {
|
||||
aOut = 0; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = static_cast<uint8_t>(aIn);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(int aIn, int16_t& aOut)
|
||||
{
|
||||
|
@ -71,6 +83,20 @@ Convert(uint8_t aIn, bool& aOut)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, char& aOut)
|
||||
{
|
||||
aOut = static_cast<char>(aIn);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, int& aOut)
|
||||
{
|
||||
aOut = static_cast<int>(aIn);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothAclState& aOut)
|
||||
{
|
||||
|
@ -100,6 +126,97 @@ Convert(uint8_t aIn, BluetoothBondState& aOut)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeAudioState& aOut)
|
||||
{
|
||||
static const BluetoothHandsfreeAudioState sAudioState[] = {
|
||||
CONVERT(0x00, HFP_AUDIO_STATE_DISCONNECTED),
|
||||
CONVERT(0x01, HFP_AUDIO_STATE_CONNECTING),
|
||||
CONVERT(0x02, HFP_AUDIO_STATE_CONNECTED),
|
||||
CONVERT(0x03, HFP_AUDIO_STATE_DISCONNECTING)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sAudioState))) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sAudioState[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeCallHoldType& aOut)
|
||||
{
|
||||
static const BluetoothHandsfreeCallHoldType sCallHoldType[] = {
|
||||
CONVERT(0x00, HFP_CALL_HOLD_RELEASEHELD),
|
||||
CONVERT(0x01, HFP_CALL_HOLD_RELEASEACTIVE_ACCEPTHELD),
|
||||
CONVERT(0x02, HFP_CALL_HOLD_HOLDACTIVE_ACCEPTHELD),
|
||||
CONVERT(0x03, HFP_CALL_HOLD_ADDHELDTOCONF)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sCallHoldType))) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sCallHoldType[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeConnectionState& aOut)
|
||||
{
|
||||
static const BluetoothHandsfreeConnectionState sConnectionState[] = {
|
||||
CONVERT(0x00, HFP_CONNECTION_STATE_DISCONNECTED),
|
||||
CONVERT(0x01, HFP_CONNECTION_STATE_CONNECTING),
|
||||
CONVERT(0x02, HFP_CONNECTION_STATE_CONNECTED),
|
||||
CONVERT(0x03, HFP_CONNECTION_STATE_SLC_CONNECTED),
|
||||
CONVERT(0x04, HFP_CONNECTION_STATE_DISCONNECTING)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sConnectionState))) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sConnectionState[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeNRECState& aOut)
|
||||
{
|
||||
static const BluetoothHandsfreeNRECState sNRECState[] = {
|
||||
CONVERT(0x00, HFP_NREC_STOPPED),
|
||||
CONVERT(0x01, HFP_NREC_STARTED)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sNRECState))) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sNRECState[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeVoiceRecognitionState& aOut)
|
||||
{
|
||||
static const BluetoothHandsfreeVoiceRecognitionState sState[] = {
|
||||
CONVERT(0x00, HFP_VOICE_RECOGNITION_STOPPED),
|
||||
CONVERT(0x01, HFP_VOICE_RECOGNITION_STOPPED)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sState))) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sState[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeVolumeType& aOut)
|
||||
{
|
||||
static const BluetoothHandsfreeVolumeType sVolumeType[] = {
|
||||
CONVERT(0x00, HFP_VOLUME_TYPE_SPEAKER),
|
||||
CONVERT(0x01, HFP_VOLUME_TYPE_MICROPHONE)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sVolumeType))) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sVolumeType[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(int32_t aIn, BluetoothDeviceType& aOut)
|
||||
{
|
||||
|
@ -373,6 +490,147 @@ Convert(const BluetoothAddress& aIn, nsAString& aOut)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeAtResponse aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sAtResponse[] = {
|
||||
CONVERT(HFP_AT_RESPONSE_ERROR, 0x00),
|
||||
CONVERT(HFP_AT_RESPONSE_OK, 0x01)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sAtResponse))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sAtResponse[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallAddressType aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sCallAddressType[] = {
|
||||
CONVERT(HFP_CALL_ADDRESS_TYPE_UNKNOWN, 0x81),
|
||||
CONVERT(HFP_CALL_ADDRESS_TYPE_INTERNATIONAL, 0x91)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sCallAddressType))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sCallAddressType[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallDirection aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sCallDirection[] = {
|
||||
CONVERT(HFP_CALL_DIRECTION_OUTGOING, 0x00),
|
||||
CONVERT(HFP_CALL_DIRECTION_INCOMING, 0x01)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sCallDirection))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sCallDirection[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallState aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sCallState[] = {
|
||||
CONVERT(HFP_CALL_STATE_ACTIVE, 0x00),
|
||||
CONVERT(HFP_CALL_STATE_HELD, 0x01),
|
||||
CONVERT(HFP_CALL_STATE_DIALING, 0x02),
|
||||
CONVERT(HFP_CALL_STATE_ALERTING, 0x03),
|
||||
CONVERT(HFP_CALL_STATE_INCOMING, 0x04),
|
||||
CONVERT(HFP_CALL_STATE_WAITING, 0x05),
|
||||
CONVERT(HFP_CALL_STATE_IDLE, 0x06)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sCallState))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sCallState[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallMode aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sCallMode[] = {
|
||||
CONVERT(HFP_CALL_MODE_VOICE, 0x00),
|
||||
CONVERT(HFP_CALL_MODE_DATA, 0x01),
|
||||
CONVERT(HFP_CALL_MODE_FAX, 0x02)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sCallMode))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sCallMode[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallMptyType aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sCallMptyType[] = {
|
||||
CONVERT(HFP_CALL_MPTY_TYPE_SINGLE, 0x00),
|
||||
CONVERT(HFP_CALL_MPTY_TYPE_MULTI, 0x01)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sCallMptyType))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sCallMptyType[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeNetworkState aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sNetworkState[] = {
|
||||
CONVERT(HFP_NETWORK_STATE_NOT_AVAILABLE, 0x00),
|
||||
CONVERT(HFP_NETWORK_STATE_AVAILABLE, 0x01)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sNetworkState))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sNetworkState[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeServiceType aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sServiceType[] = {
|
||||
CONVERT(HFP_SERVICE_TYPE_HOME, 0x00),
|
||||
CONVERT(HFP_SERVICE_TYPE_ROAMING, 0x01)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sServiceType))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sServiceType[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeVolumeType aIn, uint8_t& aOut)
|
||||
{
|
||||
static const uint8_t sVolumeType[] = {
|
||||
CONVERT(HFP_VOLUME_TYPE_SPEAKER, 0x00),
|
||||
CONVERT(HFP_VOLUME_TYPE_MICROPHONE, 0x01)
|
||||
};
|
||||
if (NS_WARN_IF(aIn >= MOZ_ARRAY_LENGTH(sVolumeType))) {
|
||||
aOut = 0x00; // silences compiler warning
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
aOut = sVolumeType[aIn];
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothPropertyType aIn, uint8_t& aOut)
|
||||
{
|
||||
|
@ -522,6 +780,69 @@ PackPDU(const BluetoothDaemonPDUHeader& aIn, BluetoothDaemonPDU& aPDU)
|
|||
return PackPDU(aIn.mService, aIn.mOpcode, aIn.mLength, aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeAtResponse& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeAtResponse, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallAddressType& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeCallAddressType, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallDirection& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeCallDirection, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallMode& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeCallMode, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallMptyType& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeCallMptyType, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallState& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeCallState, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeNetworkState& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeNetworkState, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeServiceType& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeServiceType, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeVolumeType& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackConversion<BluetoothHandsfreeVolumeType, uint8_t>(aIn), aPDU);
|
||||
}
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothNamedValue& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
|
@ -607,6 +928,12 @@ UnpackPDU(BluetoothDaemonPDU& aPDU, bool& aOut)
|
|||
return UnpackPDU(aPDU, UnpackConversion<uint8_t, bool>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, char& aOut)
|
||||
{
|
||||
return UnpackPDU(aPDU, UnpackConversion<uint8_t, char>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothAclState& aOut)
|
||||
{
|
||||
|
@ -626,6 +953,50 @@ UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothDeviceType& aOut)
|
|||
aPDU, UnpackConversion<int32_t, BluetoothDeviceType>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeAudioState& aOut)
|
||||
{
|
||||
return UnpackPDU(
|
||||
aPDU, UnpackConversion<uint8_t, BluetoothHandsfreeAudioState>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeCallHoldType& aOut)
|
||||
{
|
||||
return UnpackPDU(
|
||||
aPDU, UnpackConversion<uint8_t, BluetoothHandsfreeCallHoldType>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeConnectionState& aOut)
|
||||
{
|
||||
return UnpackPDU(
|
||||
aPDU, UnpackConversion<uint8_t, BluetoothHandsfreeConnectionState>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeNRECState& aOut)
|
||||
{
|
||||
return UnpackPDU(
|
||||
aPDU, UnpackConversion<uint8_t, BluetoothHandsfreeNRECState>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeVoiceRecognitionState& aOut)
|
||||
{
|
||||
return UnpackPDU(
|
||||
aPDU,
|
||||
UnpackConversion<uint8_t, BluetoothHandsfreeVoiceRecognitionState>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeVolumeType& aOut)
|
||||
{
|
||||
return UnpackPDU(
|
||||
aPDU, UnpackConversion<uint8_t, BluetoothHandsfreeVolumeType>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothProperty& aOut)
|
||||
{
|
||||
|
@ -769,4 +1140,64 @@ UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothStatus& aOut)
|
|||
return UnpackPDU(aPDU, UnpackConversion<uint8_t, BluetoothStatus>(aOut));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, nsDependentCString& aOut)
|
||||
{
|
||||
// We get a pointer to the first character in the PDU, a length
|
||||
// of 1 ensures we consume the \0 byte. With 'str' pointing to
|
||||
// the string in the PDU, we can copy the actual bytes.
|
||||
|
||||
const char* str = reinterpret_cast<const char*>(aPDU.Consume(1));
|
||||
if (NS_WARN_IF(!str)) {
|
||||
return NS_ERROR_ILLEGAL_VALUE; // end of PDU
|
||||
}
|
||||
|
||||
const char* end = static_cast<char*>(memchr(str, '\0', aPDU.GetSize()));
|
||||
if (NS_WARN_IF(!end)) {
|
||||
return NS_ERROR_ILLEGAL_VALUE; // no string terminator
|
||||
}
|
||||
|
||||
ptrdiff_t len = end - str;
|
||||
|
||||
const uint8_t* rest = aPDU.Consume(len);
|
||||
if (NS_WARN_IF(!rest)) {
|
||||
// We couldn't consume bytes that should have been there.
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
|
||||
aOut.Rebind(str, len);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, const UnpackCString0& aOut)
|
||||
{
|
||||
nsDependentCString cstring;
|
||||
|
||||
nsresult rv = UnpackPDU(aPDU, cstring);
|
||||
if (NS_FAILED(rv)) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
|
||||
aOut.mString->AssignASCII(cstring.get(), cstring.Length());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, const UnpackString0& aOut)
|
||||
{
|
||||
nsDependentCString cstring;
|
||||
|
||||
nsresult rv = UnpackPDU(aPDU, cstring);
|
||||
if (NS_FAILED(rv)) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
|
||||
*aOut.mString = NS_ConvertUTF8toUTF16(cstring);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
||||
|
|
|
@ -103,15 +103,42 @@ Convert(bool aIn, uint8_t& aOut);
|
|||
nsresult
|
||||
Convert(bool aIn, BluetoothScanMode& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(int aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(int aIn, int16_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, bool& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, char& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, int& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothAclState& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeAudioState& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeCallHoldType& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeConnectionState& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeNRECState& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeVoiceRecognitionState& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothHandsfreeVolumeType& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(uint8_t aIn, BluetoothBondState& aOut);
|
||||
|
||||
|
@ -157,6 +184,33 @@ Convert(BluetoothAclState aIn, bool& aOut);
|
|||
nsresult
|
||||
Convert(const BluetoothAddress& aIn, nsAString& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeAtResponse aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallAddressType aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallDirection aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallState aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallMode aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeCallMptyType aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeNetworkState aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeServiceType aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothHandsfreeVolumeType aIn, uint8_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothPropertyType aIn, uint8_t& aOut);
|
||||
|
||||
|
@ -215,6 +269,33 @@ PackPDU(const BluetoothConfigurationParameter& aIn, BluetoothDaemonPDU& aPDU);
|
|||
nsresult
|
||||
PackPDU(const BluetoothDaemonPDUHeader& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeAtResponse& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallAddressType& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallDirection& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallMode& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallMptyType& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeCallState& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeNetworkState& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeServiceType& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothHandsfreeVolumeType& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
nsresult
|
||||
PackPDU(const BluetoothNamedValue& aIn, BluetoothDaemonPDU& aPDU);
|
||||
|
||||
|
@ -302,6 +383,29 @@ PackPDU<uint8_t>(const PackArray<uint8_t>& aIn, BluetoothDaemonPDU& aPDU)
|
|||
return aPDU.Write(aIn.mData, aIn.mLength);
|
||||
}
|
||||
|
||||
/* |PackCString0| is a helper for packing 0-terminated C string,
|
||||
* including the \0 character. Pass an instance of this structure
|
||||
* as the first argument to |PackPDU| to pack a string.
|
||||
*/
|
||||
struct PackCString0
|
||||
{
|
||||
PackCString0(const nsCString& aString)
|
||||
: mString(aString)
|
||||
{ }
|
||||
|
||||
const nsCString& mString;
|
||||
};
|
||||
|
||||
/* This implementation of |PackPDU| packs a 0-terminated C string.
|
||||
*/
|
||||
inline nsresult
|
||||
PackPDU(const PackCString0& aIn, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
return PackPDU(
|
||||
PackArray<uint8_t>(reinterpret_cast<const uint8_t*>(aIn.mString.get()),
|
||||
aIn.mString.Length() + 1), aPDU);
|
||||
}
|
||||
|
||||
template <typename T1, typename T2>
|
||||
inline nsresult
|
||||
PackPDU(const T1& aIn1, const T2& aIn2, BluetoothDaemonPDU& aPDU)
|
||||
|
@ -375,6 +479,41 @@ PackPDU(const T1& aIn1, const T2& aIn2, const T3& aIn3,
|
|||
return PackPDU(aIn5, aPDU);
|
||||
}
|
||||
|
||||
template <typename T1, typename T2, typename T3,
|
||||
typename T4, typename T5, typename T6,
|
||||
typename T7>
|
||||
inline nsresult
|
||||
PackPDU(const T1& aIn1, const T2& aIn2, const T3& aIn3,
|
||||
const T4& aIn4, const T5& aIn5, const T6& aIn6,
|
||||
const T7& aIn7, BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
nsresult rv = PackPDU(aIn1, aPDU);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
rv = PackPDU(aIn2, aPDU);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
rv = PackPDU(aIn3, aPDU);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
rv = PackPDU(aIn4, aPDU);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
rv = PackPDU(aIn5, aPDU);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
rv = PackPDU(aIn6, aPDU);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
return PackPDU(aIn7, aPDU);
|
||||
}
|
||||
|
||||
//
|
||||
// Unpacking
|
||||
//
|
||||
|
@ -412,6 +551,9 @@ UnpackPDU(BluetoothDaemonPDU& aPDU, uint32_t& aOut)
|
|||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, bool& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, char& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothAclState& aOut);
|
||||
|
||||
|
@ -441,6 +583,25 @@ UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothDaemonPDUHeader& aOut)
|
|||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothDeviceType& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeAudioState& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeCallHoldType& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeConnectionState& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeNRECState& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU,
|
||||
BluetoothHandsfreeVoiceRecognitionState& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothHandsfreeVolumeType& aOut);
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothRemoteInfo& aOut);
|
||||
|
||||
|
@ -474,6 +635,9 @@ UnpackPDU(BluetoothDaemonPDU& aPDU, BluetoothUuid& aOut)
|
|||
return aPDU.Read(aOut.mUuid, sizeof(aOut.mUuid));
|
||||
}
|
||||
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, nsDependentCString& aOut);
|
||||
|
||||
/* |UnpackConversion| is a helper for convering unpacked values. Pass
|
||||
* an instance of this structure to |UnpackPDU| to read a value from
|
||||
* the PDU in the input type and convert it to the output type.
|
||||
|
@ -565,6 +729,44 @@ UnpackPDU(BluetoothDaemonPDU& aPDU, nsTArray<T>& aOut)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/* |UnpackCString0| is a helper for unpacking 0-terminated C string,
|
||||
* including the \0 character. Pass an instance of this structure
|
||||
* as the first argument to |UnpackPDU| to unpack a string.
|
||||
*/
|
||||
struct UnpackCString0
|
||||
{
|
||||
UnpackCString0(nsCString& aString)
|
||||
: mString(&aString)
|
||||
{ }
|
||||
|
||||
nsCString* mString; // non-null by construction
|
||||
};
|
||||
|
||||
/* This implementation of |UnpackPDU| unpacks a 0-terminated C string.
|
||||
*/
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, const UnpackCString0& aOut);
|
||||
|
||||
/* |UnpackString0| is a helper for unpacking 0-terminated C string,
|
||||
* including the \0 character. Pass an instance of this structure
|
||||
* as the first argument to |UnpackPDU| to unpack a C string and convert
|
||||
* it to wide-character encoding.
|
||||
*/
|
||||
struct UnpackString0
|
||||
{
|
||||
UnpackString0(nsString& aString)
|
||||
: mString(&aString)
|
||||
{ }
|
||||
|
||||
nsString* mString; // non-null by construction
|
||||
};
|
||||
|
||||
/* This implementation of |UnpackPDU| unpacks a 0-terminated C string
|
||||
* and converts it to wide-character encoding.
|
||||
*/
|
||||
nsresult
|
||||
UnpackPDU(BluetoothDaemonPDU& aPDU, const UnpackString0& aOut);
|
||||
|
||||
//
|
||||
// Init operators
|
||||
//
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "BluetoothDaemonInterface.h"
|
||||
#include "BluetoothDaemonHandsfreeInterface.h"
|
||||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothDaemonSetupInterface.h"
|
||||
#include "BluetoothDaemonSocketInterface.h"
|
||||
|
@ -15,10 +16,6 @@ using namespace mozilla::ipc;
|
|||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
template<class T>
|
||||
struct interface_traits
|
||||
{ };
|
||||
|
||||
//
|
||||
// Protocol initialization and setup
|
||||
//
|
||||
|
@ -1363,10 +1360,17 @@ class BluetoothDaemonProtocol MOZ_FINAL
|
|||
, public BluetoothDaemonSetupModule
|
||||
, public BluetoothDaemonCoreModule
|
||||
, public BluetoothDaemonSocketModule
|
||||
, public BluetoothDaemonHandsfreeModule
|
||||
{
|
||||
public:
|
||||
BluetoothDaemonProtocol(BluetoothDaemonConnection* aConnection);
|
||||
|
||||
nsresult RegisterModule(uint8_t aId, uint8_t aMode,
|
||||
BluetoothSetupResultHandler* aRes) MOZ_OVERRIDE;
|
||||
|
||||
nsresult UnregisterModule(uint8_t aId,
|
||||
BluetoothSetupResultHandler* aRes) MOZ_OVERRIDE;
|
||||
|
||||
// Outgoing PDUs
|
||||
//
|
||||
|
||||
|
@ -1388,6 +1392,8 @@ private:
|
|||
BluetoothDaemonPDU& aPDU, void* aUserData);
|
||||
void HandleSocketSvc(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU, void* aUserData);
|
||||
void HandleHandsfreeSvc(const BluetoothDaemonPDUHeader& aHeader,
|
||||
BluetoothDaemonPDU& aPDU, void* aUserData);
|
||||
|
||||
BluetoothDaemonConnection* mConnection;
|
||||
nsTArray<void*> mUserDataQ;
|
||||
|
@ -1400,6 +1406,20 @@ BluetoothDaemonProtocol::BluetoothDaemonProtocol(
|
|||
MOZ_ASSERT(mConnection);
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothDaemonProtocol::RegisterModule(uint8_t aId, uint8_t aMode,
|
||||
BluetoothSetupResultHandler* aRes)
|
||||
{
|
||||
return BluetoothDaemonSetupModule::RegisterModuleCmd(aId, aMode, aRes);
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothDaemonProtocol::UnregisterModule(uint8_t aId,
|
||||
BluetoothSetupResultHandler* aRes)
|
||||
{
|
||||
return BluetoothDaemonSetupModule::UnregisterModuleCmd(aId, aRes);
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothDaemonProtocol::Send(BluetoothDaemonPDU* aPDU, void* aUserData)
|
||||
{
|
||||
|
@ -1434,6 +1454,14 @@ BluetoothDaemonProtocol::HandleSocketSvc(
|
|||
BluetoothDaemonSocketModule::HandleSvc(aHeader, aPDU, aUserData);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothDaemonProtocol::HandleHandsfreeSvc(
|
||||
const BluetoothDaemonPDUHeader& aHeader, BluetoothDaemonPDU& aPDU,
|
||||
void* aUserData)
|
||||
{
|
||||
BluetoothDaemonHandsfreeModule::HandleSvc(aHeader, aPDU, aUserData);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothDaemonProtocol::Handle(BluetoothDaemonPDU& aPDU)
|
||||
{
|
||||
|
@ -1441,7 +1469,11 @@ BluetoothDaemonProtocol::Handle(BluetoothDaemonPDU& aPDU)
|
|||
const BluetoothDaemonPDUHeader&, BluetoothDaemonPDU&, void*) = {
|
||||
INIT_ARRAY_AT(0x00, &BluetoothDaemonProtocol::HandleSetupSvc),
|
||||
INIT_ARRAY_AT(0x01, &BluetoothDaemonProtocol::HandleCoreSvc),
|
||||
INIT_ARRAY_AT(0x02, &BluetoothDaemonProtocol::HandleSocketSvc)
|
||||
INIT_ARRAY_AT(0x02, &BluetoothDaemonProtocol::HandleSocketSvc),
|
||||
INIT_ARRAY_AT(0x03, nullptr), // HID host
|
||||
INIT_ARRAY_AT(0x04, nullptr), // PAN
|
||||
INIT_ARRAY_AT(BluetoothDaemonHandsfreeModule::SERVICE_ID,
|
||||
&BluetoothDaemonProtocol::HandleHandsfreeSvc)
|
||||
};
|
||||
|
||||
BluetoothDaemonPDUHeader header;
|
||||
|
@ -2009,7 +2041,13 @@ BluetoothDaemonInterface::GetBluetoothSocketInterface()
|
|||
BluetoothHandsfreeInterface*
|
||||
BluetoothDaemonInterface::GetBluetoothHandsfreeInterface()
|
||||
{
|
||||
return nullptr;
|
||||
if (mHandsfreeInterface) {
|
||||
return mHandsfreeInterface;
|
||||
}
|
||||
|
||||
mHandsfreeInterface = new BluetoothDaemonHandsfreeInterface(mProtocol);
|
||||
|
||||
return mHandsfreeInterface;
|
||||
}
|
||||
|
||||
BluetoothA2dpInterface*
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
class BluetoothDaemonChannel;
|
||||
class BluetoothDaemonHandsfreeInterface;
|
||||
class BluetoothDaemonProtocol;
|
||||
class BluetoothDaemonSocketInterface;
|
||||
|
||||
|
@ -125,6 +126,7 @@ private:
|
|||
nsTArray<nsRefPtr<BluetoothResultHandler> > mResultHandlerQ;
|
||||
|
||||
nsAutoPtr<BluetoothDaemonSocketInterface> mSocketInterface;
|
||||
nsAutoPtr<BluetoothDaemonHandsfreeInterface> mHandsfreeInterface;
|
||||
};
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
||||
|
|
|
@ -48,6 +48,7 @@ if CONFIG['MOZ_B2G_BT']:
|
|||
'bluedroid/BluetoothA2dpHALInterface.cpp',
|
||||
'bluedroid/BluetoothA2dpManager.cpp',
|
||||
'bluedroid/BluetoothAvrcpHALInterface.cpp',
|
||||
'bluedroid/BluetoothDaemonHandsfreeInterface.cpp',
|
||||
'bluedroid/BluetoothDaemonHelpers.cpp',
|
||||
'bluedroid/BluetoothDaemonInterface.cpp',
|
||||
'bluedroid/BluetoothDaemonSetupInterface.cpp',
|
||||
|
|
|
@ -1150,15 +1150,15 @@ IdlInterface.prototype.test_self = function()
|
|||
|
||||
if (!this.is_callback()) {
|
||||
test(function() {
|
||||
// This function tests WebIDL as of 2013-08-25.
|
||||
// http://dev.w3.org/2006/webapi/WebIDL/#es-interface-call
|
||||
// This function tests WebIDL as of 2014-10-25.
|
||||
// https://heycam.github.io/webidl/#es-interface-call
|
||||
|
||||
assert_own_property(window, this.name,
|
||||
"window does not have own property " + format_value(this.name));
|
||||
|
||||
// "Interface objects for non-callback interfaces MUST have a
|
||||
// property named “length” with attributes { [[Writable]]: false,
|
||||
// [[Enumerable]]: false, [[Configurable]]: false } whose value is
|
||||
// [[Enumerable]]: false, [[Configurable]]: true } whose value is
|
||||
// a Number."
|
||||
assert_own_property(window[this.name], "length");
|
||||
var desc = Object.getOwnPropertyDescriptor(window[this.name], "length");
|
||||
|
@ -1166,7 +1166,7 @@ IdlInterface.prototype.test_self = function()
|
|||
assert_false("set" in desc, this.name + ".length has setter");
|
||||
assert_false(desc.writable, this.name + ".length is writable");
|
||||
assert_false(desc.enumerable, this.name + ".length is enumerable");
|
||||
assert_false(desc.configurable, this.name + ".length is configurable");
|
||||
assert_true(desc.configurable, this.name + ".length is not configurable");
|
||||
|
||||
var constructors = this.extAttrs
|
||||
.filter(function(attr) { return attr.name == "Constructor"; });
|
||||
|
|
|
@ -119,3 +119,38 @@ nsSVGPolyElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
|
|||
aMarks->LastElement().angle = prevAngle;
|
||||
aMarks->LastElement().type = nsSVGMark::eEnd;
|
||||
}
|
||||
|
||||
bool
|
||||
nsSVGPolyElement::GetGeometryBounds(Rect* aBounds, Float aStrokeWidth,
|
||||
const Matrix& aTransform)
|
||||
{
|
||||
const SVGPointList &points = mPoints.GetAnimValue();
|
||||
|
||||
if (!points.Length()) {
|
||||
// Rendering of the element is disabled
|
||||
aBounds->SetEmpty();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (aStrokeWidth > 0) {
|
||||
// We don't handle stroke-miterlimit etc. yet
|
||||
return false;
|
||||
}
|
||||
|
||||
if (aTransform.IsRectilinear()) {
|
||||
// We can avoid transforming each point and just transform the result.
|
||||
// Important for large point lists.
|
||||
Rect bounds(points[0], Size());
|
||||
for (uint32_t i = 1; i < points.Length(); ++i) {
|
||||
bounds.ExpandToEnclose(points[i]);
|
||||
}
|
||||
*aBounds = aTransform.TransformBounds(bounds);
|
||||
} else {
|
||||
*aBounds = Rect(aTransform * points[0], Size());
|
||||
for (uint32_t i = 1; i < points.Length(); ++i) {
|
||||
aBounds->ExpandToEnclose(aTransform * points[i]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ public:
|
|||
virtual bool AttributeDefinesGeometry(const nsIAtom *aName) MOZ_OVERRIDE;
|
||||
virtual bool IsMarkable() MOZ_OVERRIDE { return true; }
|
||||
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) MOZ_OVERRIDE;
|
||||
virtual bool GetGeometryBounds(Rect* aBounds, Float aStrokeWidth,
|
||||
const Matrix& aTransform) MOZ_OVERRIDE;
|
||||
|
||||
// WebIDL
|
||||
already_AddRefed<mozilla::DOMSVGPointList> Points();
|
||||
|
|
|
@ -9,6 +9,12 @@ const DEFAULT_ECC_LIST = "112,911";
|
|||
function setEccListProperty(list) {
|
||||
log("Set property ril.ecclist: " + list);
|
||||
|
||||
// We should wrap empty |list| by ''. Otherwise, the entire command will be
|
||||
// "setprop ril.ecclist" which causus the command error.
|
||||
if (!list) {
|
||||
list = "''";
|
||||
}
|
||||
|
||||
let deferred = Promise.defer();
|
||||
try {
|
||||
emulator.runShellCmd(["setprop","ril.ecclist", list]).then(function() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
[Constructor(optional USVString init = ""),
|
||||
Constructor(URLSearchParams init),
|
||||
Exposed=(Window,Worker)]
|
||||
Exposed=(Window,Worker,System)]
|
||||
interface URLSearchParams {
|
||||
void append(USVString name, USVString value);
|
||||
void delete(USVString name);
|
||||
|
|
|
@ -34,7 +34,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1086996
|
|||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1086996">Mozilla Bug 1086996</a>
|
||||
<div id="boundContent" style="-moz-binding: url(#mainBinding)"></div>
|
||||
<div id="content" style="display: none">
|
||||
</div>
|
||||
<pre id="test">
|
||||
|
@ -56,5 +55,8 @@ function gotEvent() {
|
|||
]]>
|
||||
</script>
|
||||
</pre>
|
||||
<!-- This div needs to come after the <script> so we don't run the binding ctor
|
||||
before the <script> has been parsed -->
|
||||
<div id="boundContent" style="-moz-binding: url(#mainBinding)"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -177,6 +177,23 @@ struct BaseRect {
|
|||
*static_cast<Sub*>(this) = aRect1.UnionEdges(aRect2);
|
||||
}
|
||||
|
||||
// Expands the rect to include the point
|
||||
void ExpandToEnclose(const Point& aPoint)
|
||||
{
|
||||
if (aPoint.x < x) {
|
||||
width = XMost() - aPoint.x;
|
||||
x = aPoint.x;
|
||||
} else if (aPoint.x > XMost()) {
|
||||
width = aPoint.x - x;
|
||||
}
|
||||
if (aPoint.y < y) {
|
||||
height = YMost() - aPoint.y;
|
||||
y = aPoint.y;
|
||||
} else if (aPoint.y > YMost()) {
|
||||
height = aPoint.y - y;
|
||||
}
|
||||
}
|
||||
|
||||
void SetRect(T aX, T aY, T aWidth, T aHeight)
|
||||
{
|
||||
x = aX; y = aY; width = aWidth; height = aHeight;
|
||||
|
|
|
@ -396,7 +396,7 @@ DWriteGlyphRunFromGlyphs(const GlyphBuffer &aGlyphs, ScaledFontDWrite *aFont, Au
|
|||
run->isSideways = FALSE;
|
||||
}
|
||||
|
||||
static TemporaryRef<ID2D1Geometry>
|
||||
static inline TemporaryRef<ID2D1Geometry>
|
||||
ConvertRectToGeometry(const D2D1_RECT_F& aRect)
|
||||
{
|
||||
RefPtr<ID2D1RectangleGeometry> rectGeom;
|
||||
|
@ -404,7 +404,7 @@ ConvertRectToGeometry(const D2D1_RECT_F& aRect)
|
|||
return rectGeom.forget();
|
||||
}
|
||||
|
||||
static TemporaryRef<ID2D1Geometry>
|
||||
static inline TemporaryRef<ID2D1Geometry>
|
||||
GetTransformedGeometry(ID2D1Geometry *aGeometry, const D2D1_MATRIX_3X2_F &aTransform)
|
||||
{
|
||||
RefPtr<ID2D1PathGeometry> tmpGeometry;
|
||||
|
@ -417,7 +417,7 @@ GetTransformedGeometry(ID2D1Geometry *aGeometry, const D2D1_MATRIX_3X2_F &aTrans
|
|||
return tmpGeometry.forget();
|
||||
}
|
||||
|
||||
static TemporaryRef<ID2D1Geometry>
|
||||
static inline TemporaryRef<ID2D1Geometry>
|
||||
IntersectGeometry(ID2D1Geometry *aGeometryA, ID2D1Geometry *aGeometryB)
|
||||
{
|
||||
RefPtr<ID2D1PathGeometry> pathGeom;
|
||||
|
@ -430,7 +430,7 @@ IntersectGeometry(ID2D1Geometry *aGeometryA, ID2D1Geometry *aGeometryB)
|
|||
return pathGeom.forget();
|
||||
}
|
||||
|
||||
static TemporaryRef<ID2D1StrokeStyle>
|
||||
static inline TemporaryRef<ID2D1StrokeStyle>
|
||||
CreateStrokeStyleForOptions(const StrokeOptions &aStrokeOptions)
|
||||
{
|
||||
RefPtr<ID2D1StrokeStyle> style;
|
||||
|
@ -510,7 +510,7 @@ CreateStrokeStyleForOptions(const StrokeOptions &aStrokeOptions)
|
|||
// This creates a (partially) uploaded bitmap for a DataSourceSurface. It
|
||||
// uploads the minimum requirement and possibly downscales. It adjusts the
|
||||
// input Matrix to compensate.
|
||||
static TemporaryRef<ID2D1Bitmap>
|
||||
static inline TemporaryRef<ID2D1Bitmap>
|
||||
CreatePartialBitmapForSurface(DataSourceSurface *aSurface, const Matrix &aDestinationTransform,
|
||||
const IntSize &aDestinationSize, ExtendMode aExtendMode,
|
||||
Matrix &aSourceTransform, ID2D1RenderTarget *aRT,
|
||||
|
|
|
@ -42,10 +42,9 @@ class APZTestData {
|
|||
friend struct APZTestDataToJSConverter;
|
||||
public:
|
||||
void StartNewPaint(SequenceNumber aSequenceNumber) {
|
||||
// We should never get more than one paint with the same sequence number.
|
||||
MOZ_ASSERT(mPaints.find(aSequenceNumber) == mPaints.end());
|
||||
mPaints.insert(DataStore::value_type(aSequenceNumber, Bucket()));
|
||||
// TODO(botond): MOZ_ASSERT() that we didn't already have a paint with this
|
||||
// sequence number once we get rid ofAPZCTreeManager::UpdatePanZoomControllerTree()
|
||||
// calls for repeat transactions (bug 1007728).
|
||||
}
|
||||
void LogTestDataForPaint(SequenceNumber aSequenceNumber,
|
||||
ViewID aScrollId,
|
||||
|
@ -93,10 +92,9 @@ private:
|
|||
}
|
||||
Bucket& bucket = bucketIterator->second;
|
||||
ScrollFrameData& scrollFrameData = bucket[aScrollId]; // create if doesn't exist
|
||||
MOZ_ASSERT(scrollFrameData.find(aKey) == scrollFrameData.end()
|
||||
|| scrollFrameData[aKey] == aValue);
|
||||
scrollFrameData.insert(ScrollFrameData::value_type(aKey, aValue));
|
||||
// TODO(botond): MOZ_ASSERT() that we don't already have this key once we
|
||||
// get rid of APZCTreeManager::UpdatePanZoomControllerTree() calls for
|
||||
// repeat transactions (bug 1007728).
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <windows.h>
|
||||
#include <dwrite.h>
|
||||
|
||||
static DWRITE_FONT_STRETCH
|
||||
static inline DWRITE_FONT_STRETCH
|
||||
DWriteFontStretchFromStretch(int16_t aStretch)
|
||||
{
|
||||
switch (aStretch) {
|
||||
|
@ -47,7 +47,7 @@ DWriteFontStretchFromStretch(int16_t aStretch)
|
|||
}
|
||||
}
|
||||
|
||||
static int16_t
|
||||
static inline int16_t
|
||||
FontStretchFromDWriteStretch(DWRITE_FONT_STRETCH aStretch)
|
||||
{
|
||||
switch (aStretch) {
|
||||
|
|
|
@ -1266,7 +1266,6 @@ CallTraceCallbackOnNonHeap(T *v, const TraceCallbacks &aCallbacks, const char *a
|
|||
MOZ_ASSERT(!IsInsideNursery(cell));
|
||||
JS::Heap<T> *asHeapT = reinterpret_cast<JS::Heap<T>*>(v);
|
||||
aCallbacks.Trace(asHeapT, aName, aClosure);
|
||||
MOZ_ASSERT(GCMethods<T>::asGCThingOrNull(*v) == cell);
|
||||
}
|
||||
|
||||
} /* namespace gc */
|
||||
|
|
|
@ -559,10 +559,6 @@ struct Or {
|
|||
static inline T apply(T l, T r) { return l | r; }
|
||||
};
|
||||
template<typename T>
|
||||
struct Scale {
|
||||
static inline T apply(int32_t lane, T scalar, T x) { return scalar * x; }
|
||||
};
|
||||
template<typename T>
|
||||
struct WithX {
|
||||
static inline T apply(int32_t lane, T scalar, T x) { return lane == 0 ? scalar : x; }
|
||||
};
|
||||
|
@ -578,22 +574,6 @@ template<typename T>
|
|||
struct WithW {
|
||||
static inline T apply(int32_t lane, T scalar, T x) { return lane == 3 ? scalar : x; }
|
||||
};
|
||||
template<typename T>
|
||||
struct WithFlagX {
|
||||
static inline T apply(T l, T f, T x) { return l == 0 ? (f ? 0xFFFFFFFF : 0x0) : x; }
|
||||
};
|
||||
template<typename T>
|
||||
struct WithFlagY {
|
||||
static inline T apply(T l, T f, T x) { return l == 1 ? (f ? 0xFFFFFFFF : 0x0) : x; }
|
||||
};
|
||||
template<typename T>
|
||||
struct WithFlagZ {
|
||||
static inline T apply(T l, T f, T x) { return l == 2 ? (f ? 0xFFFFFFFF : 0x0) : x; }
|
||||
};
|
||||
template<typename T>
|
||||
struct WithFlagW {
|
||||
static inline T apply(T l, T f, T x) { return l == 3 ? (f ? 0xFFFFFFFF : 0x0) : x; }
|
||||
};
|
||||
struct ShiftLeft {
|
||||
static inline int32_t apply(int32_t v, int32_t bits) { return v << bits; }
|
||||
};
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
* https://github.com/johnmccutchan/ecmascript_simd/blob/master/src/ecmascript_simd.js
|
||||
*/
|
||||
|
||||
#define FLOAT32X4_NULLARY_FUNCTION_LIST(V) \
|
||||
V(zero, (FuncZero<Float32x4>), 0, 0)
|
||||
|
||||
#define FLOAT32X4_UNARY_FUNCTION_LIST(V) \
|
||||
V(abs, (UnaryFunc<Float32x4, Abs, Float32x4>), 1, 0) \
|
||||
V(fromInt32x4, (FuncConvert<Int32x4, Float32x4> ), 1, 0) \
|
||||
|
@ -52,7 +49,6 @@
|
|||
V(mul, (BinaryFunc<Float32x4, Mul, Float32x4>), 2, 0) \
|
||||
V(notEqual, (CompareFunc<Float32x4, NotEqual>), 2, 0) \
|
||||
V(or, (CoercedBinaryFunc<Float32x4, Int32x4, Or, Float32x4>), 2, 0) \
|
||||
V(scale, (FuncWith<Float32x4, Scale>), 2, 0) \
|
||||
V(store, (Store<Float32x4, 4>), 3, 0) \
|
||||
V(storeXYZ, (Store<Float32x4, 3>), 3, 0) \
|
||||
V(storeXY, (Store<Float32x4, 2>), 3, 0) \
|
||||
|
@ -73,15 +69,11 @@
|
|||
V(shuffle, Shuffle<Float32x4>, 3, 0)
|
||||
|
||||
#define FLOAT32X4_FUNCTION_LIST(V) \
|
||||
FLOAT32X4_NULLARY_FUNCTION_LIST(V) \
|
||||
FLOAT32X4_UNARY_FUNCTION_LIST(V) \
|
||||
FLOAT32X4_BINARY_FUNCTION_LIST(V) \
|
||||
FLOAT32X4_TERNARY_FUNCTION_LIST(V) \
|
||||
FLOAT32X4_SHUFFLE_FUNCTION_LIST(V)
|
||||
|
||||
#define INT32X4_NULLARY_FUNCTION_LIST(V) \
|
||||
V(zero, (FuncZero<Int32x4>), 0, 0)
|
||||
|
||||
#define INT32X4_UNARY_FUNCTION_LIST(V) \
|
||||
V(fromFloat32x4, (FuncConvert<Float32x4, Int32x4>), 1, 0) \
|
||||
V(fromFloat32x4Bits, (FuncConvertBits<Float32x4, Int32x4>), 1, 0) \
|
||||
|
@ -94,12 +86,15 @@
|
|||
V(and, (BinaryFunc<Int32x4, And, Int32x4>), 2, 0) \
|
||||
V(equal, (CompareFunc<Int32x4, Equal>), 2, 0) \
|
||||
V(greaterThan, (CompareFunc<Int32x4, GreaterThan>), 2, 0) \
|
||||
V(greaterThanOrEqual, (CompareFunc<Int32x4, GreaterThanOrEqual>), 2, 0) \
|
||||
V(lessThan, (CompareFunc<Int32x4, LessThan>), 2, 0) \
|
||||
V(lessThanOrEqual, (CompareFunc<Int32x4, LessThanOrEqual>), 2, 0) \
|
||||
V(load, (Load<Int32x4, 4>), 2, 0) \
|
||||
V(loadXYZ, (Load<Int32x4, 3>), 2, 0) \
|
||||
V(loadXY, (Load<Int32x4, 2>), 2, 0) \
|
||||
V(loadX, (Load<Int32x4, 1>), 2, 0) \
|
||||
V(mul, (BinaryFunc<Int32x4, Mul, Int32x4>), 2, 0) \
|
||||
V(notEqual, (CompareFunc<Int32x4, NotEqual>), 2, 0) \
|
||||
V(or, (BinaryFunc<Int32x4, Or, Int32x4>), 2, 0) \
|
||||
V(sub, (BinaryFunc<Int32x4, Sub, Int32x4>), 2, 0) \
|
||||
V(shiftLeft, (Int32x4BinaryScalar<ShiftLeft>), 2, 0) \
|
||||
|
@ -109,10 +104,6 @@
|
|||
V(storeXYZ, (Store<Int32x4, 3>), 3, 0) \
|
||||
V(storeXY, (Store<Int32x4, 2>), 3, 0) \
|
||||
V(storeX, (Store<Int32x4, 1>), 3, 0) \
|
||||
V(withFlagX, (FuncWith<Int32x4, WithFlagX>), 2, 0) \
|
||||
V(withFlagY, (FuncWith<Int32x4, WithFlagY>), 2, 0) \
|
||||
V(withFlagZ, (FuncWith<Int32x4, WithFlagZ>), 2, 0) \
|
||||
V(withFlagW, (FuncWith<Int32x4, WithFlagW>), 2, 0) \
|
||||
V(withX, (FuncWith<Int32x4, WithX>), 2, 0) \
|
||||
V(withY, (FuncWith<Int32x4, WithY>), 2, 0) \
|
||||
V(withZ, (FuncWith<Int32x4, WithZ>), 2, 0) \
|
||||
|
@ -130,7 +121,6 @@
|
|||
V(shuffle, Shuffle<Int32x4>, 3, 0)
|
||||
|
||||
#define INT32X4_FUNCTION_LIST(V) \
|
||||
INT32X4_NULLARY_FUNCTION_LIST(V) \
|
||||
INT32X4_UNARY_FUNCTION_LIST(V) \
|
||||
INT32X4_BINARY_FUNCTION_LIST(V) \
|
||||
INT32X4_TERNARY_FUNCTION_LIST(V) \
|
||||
|
@ -155,16 +145,16 @@
|
|||
_(max) \
|
||||
_(min) \
|
||||
_(maxNum) \
|
||||
_(minNum) \
|
||||
_(lessThanOrEqual) \
|
||||
_(notEqual) \
|
||||
_(greaterThanOrEqual)
|
||||
_(minNum)
|
||||
#define FOREACH_COMMONX4_SIMD_OP(_) \
|
||||
_(add) \
|
||||
_(sub) \
|
||||
_(lessThan) \
|
||||
_(lessThanOrEqual) \
|
||||
_(equal) \
|
||||
_(notEqual) \
|
||||
_(greaterThan) \
|
||||
_(greaterThanOrEqual) \
|
||||
_(and) \
|
||||
_(or) \
|
||||
_(xor) \
|
||||
|
|
|
@ -1770,7 +1770,7 @@ ia64*-hpux*)
|
|||
if test "$CPU_ARCH" = "x86"; then
|
||||
WIN32_SUBSYSTEM_VERSION=5.01
|
||||
else
|
||||
WIN32_SUBSYSTEM_VERSION=5.02
|
||||
WIN32_SUBSYSTEM_VERSION=6.01
|
||||
fi
|
||||
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
|
||||
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
|
||||
|
|
|
@ -611,6 +611,7 @@ class GCRuntime
|
|||
void updateAllCellPointersSerial(MovingTracer *trc, ArenasToUpdate &source);
|
||||
void updatePointersToRelocatedCells();
|
||||
void releaseRelocatedArenas(ArenaHeader *relocatedList);
|
||||
void releaseRelocatedArenasWithoutUnlocking(ArenaHeader *relocatedList, const AutoLockGC& lock);
|
||||
#ifdef DEBUG
|
||||
void protectRelocatedArenas(ArenaHeader *relocatedList);
|
||||
void unprotectRelocatedArenas(ArenaHeader *relocatedList);
|
||||
|
|
|
@ -590,26 +590,38 @@ CheckI4(WWI, 'var x = i4(1,2,3,4); x = w(x, 42);', [1, 2, 3, 42]);
|
|||
// yields all bits set to 0 (i.e 0).
|
||||
const T = -1;
|
||||
const F = 0;
|
||||
assertAsmTypeFail('glob', USE_ASM + I32 + "var lt=i4.lessThanOrEqual; function f() {} return f");
|
||||
assertAsmTypeFail('glob', USE_ASM + I32 + "var ge=i4.greaterThanOrEqual; function f() {} return f");
|
||||
assertAsmTypeFail('glob', USE_ASM + I32 + "var ne=i4.notEqual; function f() {} return f");
|
||||
|
||||
const EQI32 = 'var eq = i4.equal';
|
||||
const NEI32 = 'var ne = i4.notEqual';
|
||||
const LTI32 = 'var lt = i4.lessThan;';
|
||||
const LEI32 = 'var le = i4.lessThanOrEqual';
|
||||
const GTI32 = 'var gt = i4.greaterThan;';
|
||||
const EQI32 = 'var eq = i4.equal;';
|
||||
|
||||
CheckI4(LTI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=lt(x,y)', [F, F, F, F]);
|
||||
CheckI4(LTI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=lt(x,y)', [T, T, T, T]);
|
||||
CheckI4(LTI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=lt(x,y)', [F, T, T, F]);
|
||||
const GEI32 = 'var ge = i4.greaterThanOrEqual';
|
||||
|
||||
CheckI4(EQI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=eq(x,y)', [F, F, F, F]);
|
||||
CheckI4(EQI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=eq(x,y)', [F, F, F, F]);
|
||||
CheckI4(EQI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=eq(x,y)', [T, F, F, F]);
|
||||
|
||||
CheckI4(NEI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=ne(x,y)', [T, T, T, T]);
|
||||
CheckI4(NEI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=ne(x,y)', [T, T, T, T]);
|
||||
CheckI4(NEI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=ne(x,y)', [F, T, T, T]);
|
||||
|
||||
CheckI4(LTI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=lt(x,y)', [F, F, F, F]);
|
||||
CheckI4(LTI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=lt(x,y)', [T, T, T, T]);
|
||||
CheckI4(LTI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=lt(x,y)', [F, T, T, F]);
|
||||
|
||||
CheckI4(LEI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=le(x,y)', [F, F, F, F]);
|
||||
CheckI4(LEI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=le(x,y)', [T, T, T, T]);
|
||||
CheckI4(LEI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=le(x,y)', [T, T, T, F]);
|
||||
|
||||
CheckI4(GTI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=gt(x,y)', [T, T, T, T]);
|
||||
CheckI4(GTI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=gt(x,y)', [F, F, F, F]);
|
||||
CheckI4(GTI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=gt(x,y)', [F, F, F, T]);
|
||||
|
||||
CheckI4(GEI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=ge(x,y)', [T, T, T, T]);
|
||||
CheckI4(GEI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=ge(x,y)', [F, F, F, F]);
|
||||
CheckI4(GEI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=ge(x,y)', [T, F, F, T]);
|
||||
|
||||
const LTF32 = 'var lt=f4.lessThan;';
|
||||
const LEF32 = 'var le=f4.lessThanOrEqual;';
|
||||
const GTF32 = 'var gt=f4.greaterThan;';
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
setJitCompilerOption("ion.warmup.trigger", 30);
|
||||
|
||||
var arr = [];
|
||||
function f (cond, a) {
|
||||
var obj = { a: 0 };
|
||||
var x = 2 * a + 1;
|
||||
if (cond) {
|
||||
obj.a = x;
|
||||
arr.push(obj.a);
|
||||
obj.a = 1;
|
||||
} else {
|
||||
obj.a = 1;
|
||||
}
|
||||
return obj.a;
|
||||
}
|
||||
|
||||
for (var i = 0; i < 100; i++) {
|
||||
assertEq(f(i % 2, i), 1);
|
||||
}
|
|
@ -309,11 +309,15 @@ BaselineCompiler::emitInitializeLocals(size_t n, const Value &v)
|
|||
bool
|
||||
BaselineCompiler::emitPrologue()
|
||||
{
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
// Push link register from generateEnterJIT()'s BLR.
|
||||
masm.pushReturnAddress();
|
||||
masm.checkStackAlignment();
|
||||
#endif
|
||||
masm.push(BaselineFrameReg);
|
||||
masm.mov(BaselineStackReg, BaselineFrameReg);
|
||||
|
||||
masm.subPtr(Imm32(BaselineFrame::Size()), BaselineStackReg);
|
||||
masm.checkStackAlignment();
|
||||
|
||||
// Initialize BaselineFrame. For eval scripts, the scope chain
|
||||
// is passed in R1, so we have to be careful not to clobber
|
||||
|
@ -3450,7 +3454,7 @@ typedef bool (*InterpretResumeFn)(JSContext *, HandleObject, HandleValue, Handle
|
|||
static const VMFunction InterpretResumeInfo = FunctionInfo<InterpretResumeFn>(jit::InterpretResume);
|
||||
|
||||
typedef bool (*GeneratorThrowFn)(JSContext *, BaselineFrame *, HandleObject, HandleValue, uint32_t);
|
||||
static const VMFunction GeneratorThrowInfo = FunctionInfo<GeneratorThrowFn>(jit::GeneratorThrowOrClose);
|
||||
static const VMFunction GeneratorThrowInfo = FunctionInfo<GeneratorThrowFn>(jit::GeneratorThrowOrClose, TailCall);
|
||||
|
||||
bool
|
||||
BaselineCompiler::emit_JSOP_RESUME()
|
||||
|
|
|
@ -660,6 +660,7 @@ ICStubCompiler::tailCallVM(const VMFunction &fun, MacroAssembler &masm)
|
|||
if (!code)
|
||||
return false;
|
||||
|
||||
MOZ_ASSERT(fun.expectTailCall == TailCall);
|
||||
uint32_t argSize = fun.explicitStackSlots() * sizeof(void *);
|
||||
EmitTailCallVM(code, masm, argSize);
|
||||
return true;
|
||||
|
@ -672,6 +673,7 @@ ICStubCompiler::callVM(const VMFunction &fun, MacroAssembler &masm)
|
|||
if (!code)
|
||||
return false;
|
||||
|
||||
MOZ_ASSERT(fun.expectTailCall == NonTailCall);
|
||||
EmitCallVM(code, masm);
|
||||
return true;
|
||||
}
|
||||
|
@ -1120,7 +1122,7 @@ DoProfilerFallback(JSContext *cx, BaselineFrame *frame, ICProfiler_Fallback *stu
|
|||
|
||||
typedef bool (*DoProfilerFallbackFn)(JSContext *, BaselineFrame *frame, ICProfiler_Fallback *);
|
||||
static const VMFunction DoProfilerFallbackInfo =
|
||||
FunctionInfo<DoProfilerFallbackFn>(DoProfilerFallback);
|
||||
FunctionInfo<DoProfilerFallbackFn>(DoProfilerFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICProfiler_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -1322,7 +1324,7 @@ DoTypeMonitorFallback(JSContext *cx, BaselineFrame *frame, ICTypeMonitor_Fallbac
|
|||
typedef bool (*DoTypeMonitorFallbackFn)(JSContext *, BaselineFrame *, ICTypeMonitor_Fallback *,
|
||||
HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoTypeMonitorFallbackInfo =
|
||||
FunctionInfo<DoTypeMonitorFallbackFn>(DoTypeMonitorFallback);
|
||||
FunctionInfo<DoTypeMonitorFallbackFn>(DoTypeMonitorFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICTypeMonitor_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -1553,7 +1555,7 @@ DoTypeUpdateFallback(JSContext *cx, BaselineFrame *frame, ICUpdatedStub *stub, H
|
|||
typedef bool (*DoTypeUpdateFallbackFn)(JSContext *, BaselineFrame *, ICUpdatedStub *, HandleValue,
|
||||
HandleValue);
|
||||
const VMFunction DoTypeUpdateFallbackInfo =
|
||||
FunctionInfo<DoTypeUpdateFallbackFn>(DoTypeUpdateFallback);
|
||||
FunctionInfo<DoTypeUpdateFallbackFn>(DoTypeUpdateFallback, NonTailCall);
|
||||
|
||||
bool
|
||||
ICTypeUpdate_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -1696,7 +1698,7 @@ DoThisFallback(JSContext *cx, ICThis_Fallback *stub, HandleValue thisv, MutableH
|
|||
}
|
||||
|
||||
typedef bool (*DoThisFallbackFn)(JSContext *, ICThis_Fallback *, HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoThisFallbackInfo = FunctionInfo<DoThisFallbackFn>(DoThisFallback);
|
||||
static const VMFunction DoThisFallbackInfo = FunctionInfo<DoThisFallbackFn>(DoThisFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICThis_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -1732,7 +1734,7 @@ DoNewArray(JSContext *cx, ICNewArray_Fallback *stub, uint32_t length,
|
|||
|
||||
typedef bool(*DoNewArrayFn)(JSContext *, ICNewArray_Fallback *, uint32_t, HandleTypeObject,
|
||||
MutableHandleValue);
|
||||
static const VMFunction DoNewArrayInfo = FunctionInfo<DoNewArrayFn>(DoNewArray);
|
||||
static const VMFunction DoNewArrayInfo = FunctionInfo<DoNewArrayFn>(DoNewArray, TailCall);
|
||||
|
||||
bool
|
||||
ICNewArray_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -1765,7 +1767,7 @@ DoNewObject(JSContext *cx, ICNewObject_Fallback *stub, MutableHandleValue res)
|
|||
}
|
||||
|
||||
typedef bool(*DoNewObjectFn)(JSContext *, ICNewObject_Fallback *, MutableHandleValue);
|
||||
static const VMFunction DoNewObjectInfo = FunctionInfo<DoNewObjectFn>(DoNewObject);
|
||||
static const VMFunction DoNewObjectInfo = FunctionInfo<DoNewObjectFn>(DoNewObject, TailCall);
|
||||
|
||||
bool
|
||||
ICNewObject_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -1977,7 +1979,7 @@ DoCompareFallback(JSContext *cx, BaselineFrame *frame, ICCompare_Fallback *stub_
|
|||
typedef bool (*DoCompareFallbackFn)(JSContext *, BaselineFrame *, ICCompare_Fallback *,
|
||||
HandleValue, HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoCompareFallbackInfo =
|
||||
FunctionInfo<DoCompareFallbackFn>(DoCompareFallback, PopValues(2));
|
||||
FunctionInfo<DoCompareFallbackFn>(DoCompareFallback, TailCall, PopValues(2));
|
||||
|
||||
bool
|
||||
ICCompare_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -2312,7 +2314,7 @@ DoToBoolFallback(JSContext *cx, BaselineFrame *frame, ICToBool_Fallback *stub, H
|
|||
|
||||
typedef bool (*pf)(JSContext *, BaselineFrame *, ICToBool_Fallback *, HandleValue,
|
||||
MutableHandleValue);
|
||||
static const VMFunction fun = FunctionInfo<pf>(DoToBoolFallback);
|
||||
static const VMFunction fun = FunctionInfo<pf>(DoToBoolFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICToBool_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -2479,7 +2481,7 @@ DoToNumberFallback(JSContext *cx, ICToNumber_Fallback *stub, HandleValue arg, Mu
|
|||
|
||||
typedef bool (*DoToNumberFallbackFn)(JSContext *, ICToNumber_Fallback *, HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoToNumberFallbackInfo =
|
||||
FunctionInfo<DoToNumberFallbackFn>(DoToNumberFallback, PopValues(1));
|
||||
FunctionInfo<DoToNumberFallbackFn>(DoToNumberFallback, TailCall, PopValues(1));
|
||||
|
||||
bool
|
||||
ICToNumber_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -2722,7 +2724,7 @@ DoBinaryArithFallback(JSContext *cx, BaselineFrame *frame, ICBinaryArith_Fallbac
|
|||
typedef bool (*DoBinaryArithFallbackFn)(JSContext *, BaselineFrame *, ICBinaryArith_Fallback *,
|
||||
HandleValue, HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoBinaryArithFallbackInfo =
|
||||
FunctionInfo<DoBinaryArithFallbackFn>(DoBinaryArithFallback, PopValues(2));
|
||||
FunctionInfo<DoBinaryArithFallbackFn>(DoBinaryArithFallback, TailCall, PopValues(2));
|
||||
|
||||
bool
|
||||
ICBinaryArith_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -2768,7 +2770,7 @@ DoConcatStrings(JSContext *cx, HandleValue lhs, HandleValue rhs, MutableHandleVa
|
|||
}
|
||||
|
||||
typedef bool (*DoConcatStringsFn)(JSContext *, HandleValue, HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoConcatStringsInfo = FunctionInfo<DoConcatStringsFn>(DoConcatStrings);
|
||||
static const VMFunction DoConcatStringsInfo = FunctionInfo<DoConcatStringsFn>(DoConcatStrings, TailCall);
|
||||
|
||||
bool
|
||||
ICBinaryArith_StringConcat::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -2845,7 +2847,7 @@ DoConcatStringObject(JSContext *cx, bool lhsIsString, HandleValue lhs, HandleVal
|
|||
typedef bool (*DoConcatStringObjectFn)(JSContext *, bool lhsIsString, HandleValue, HandleValue,
|
||||
MutableHandleValue);
|
||||
static const VMFunction DoConcatStringObjectInfo =
|
||||
FunctionInfo<DoConcatStringObjectFn>(DoConcatStringObject, PopValues(2));
|
||||
FunctionInfo<DoConcatStringObjectFn>(DoConcatStringObject, TailCall, PopValues(2));
|
||||
|
||||
bool
|
||||
ICBinaryArith_StringObjectConcat::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -3132,7 +3134,7 @@ DoUnaryArithFallback(JSContext *cx, BaselineFrame *frame, ICUnaryArith_Fallback
|
|||
typedef bool (*DoUnaryArithFallbackFn)(JSContext *, BaselineFrame *, ICUnaryArith_Fallback *,
|
||||
HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoUnaryArithFallbackInfo =
|
||||
FunctionInfo<DoUnaryArithFallbackFn>(DoUnaryArithFallback, PopValues(1));
|
||||
FunctionInfo<DoUnaryArithFallbackFn>(DoUnaryArithFallback, TailCall, PopValues(1));
|
||||
|
||||
bool
|
||||
ICUnaryArith_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -4087,7 +4089,7 @@ DoGetElemFallback(JSContext *cx, BaselineFrame *frame, ICGetElem_Fallback *stub_
|
|||
typedef bool (*DoGetElemFallbackFn)(JSContext *, BaselineFrame *, ICGetElem_Fallback *,
|
||||
HandleValue, HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoGetElemFallbackInfo =
|
||||
FunctionInfo<DoGetElemFallbackFn>(DoGetElemFallback, PopValues(2));
|
||||
FunctionInfo<DoGetElemFallbackFn>(DoGetElemFallback, TailCall, PopValues(2));
|
||||
|
||||
bool
|
||||
ICGetElem_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -5150,7 +5152,7 @@ DoSetElemFallback(JSContext *cx, BaselineFrame *frame, ICSetElem_Fallback *stub_
|
|||
typedef bool (*DoSetElemFallbackFn)(JSContext *, BaselineFrame *, ICSetElem_Fallback *, Value *,
|
||||
HandleValue, HandleValue, HandleValue);
|
||||
static const VMFunction DoSetElemFallbackInfo =
|
||||
FunctionInfo<DoSetElemFallbackFn>(DoSetElemFallback, PopValues(2));
|
||||
FunctionInfo<DoSetElemFallbackFn>(DoSetElemFallback, TailCall, PopValues(2));
|
||||
|
||||
bool
|
||||
ICSetElem_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -5674,7 +5676,7 @@ DoInFallback(JSContext *cx, ICIn_Fallback *stub, HandleValue key, HandleValue ob
|
|||
typedef bool (*DoInFallbackFn)(JSContext *, ICIn_Fallback *, HandleValue, HandleValue,
|
||||
MutableHandleValue);
|
||||
static const VMFunction DoInFallbackInfo =
|
||||
FunctionInfo<DoInFallbackFn>(DoInFallback, PopValues(2));
|
||||
FunctionInfo<DoInFallbackFn>(DoInFallback, TailCall, PopValues(2));
|
||||
|
||||
bool
|
||||
ICIn_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -6038,7 +6040,7 @@ DoGetNameFallback(JSContext *cx, BaselineFrame *frame, ICGetName_Fallback *stub_
|
|||
|
||||
typedef bool (*DoGetNameFallbackFn)(JSContext *, BaselineFrame *, ICGetName_Fallback *,
|
||||
HandleObject, MutableHandleValue);
|
||||
static const VMFunction DoGetNameFallbackInfo = FunctionInfo<DoGetNameFallbackFn>(DoGetNameFallback);
|
||||
static const VMFunction DoGetNameFallbackInfo = FunctionInfo<DoGetNameFallbackFn>(DoGetNameFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICGetName_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -6149,7 +6151,7 @@ DoBindNameFallback(JSContext *cx, BaselineFrame *frame, ICBindName_Fallback *stu
|
|||
typedef bool (*DoBindNameFallbackFn)(JSContext *, BaselineFrame *, ICBindName_Fallback *,
|
||||
HandleObject, MutableHandleValue);
|
||||
static const VMFunction DoBindNameFallbackInfo =
|
||||
FunctionInfo<DoBindNameFallbackFn>(DoBindNameFallback);
|
||||
FunctionInfo<DoBindNameFallbackFn>(DoBindNameFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICBindName_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -6209,7 +6211,7 @@ DoGetIntrinsicFallback(JSContext *cx, BaselineFrame *frame, ICGetIntrinsic_Fallb
|
|||
typedef bool (*DoGetIntrinsicFallbackFn)(JSContext *, BaselineFrame *, ICGetIntrinsic_Fallback *,
|
||||
MutableHandleValue);
|
||||
static const VMFunction DoGetIntrinsicFallbackInfo =
|
||||
FunctionInfo<DoGetIntrinsicFallbackFn>(DoGetIntrinsicFallback);
|
||||
FunctionInfo<DoGetIntrinsicFallbackFn>(DoGetIntrinsicFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICGetIntrinsic_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -6833,7 +6835,7 @@ DoGetPropFallback(JSContext *cx, BaselineFrame *frame, ICGetProp_Fallback *stub_
|
|||
typedef bool (*DoGetPropFallbackFn)(JSContext *, BaselineFrame *, ICGetProp_Fallback *,
|
||||
MutableHandleValue, MutableHandleValue);
|
||||
static const VMFunction DoGetPropFallbackInfo =
|
||||
FunctionInfo<DoGetPropFallbackFn>(DoGetPropFallback, PopValues(1));
|
||||
FunctionInfo<DoGetPropFallbackFn>(DoGetPropFallback, TailCall, PopValues(1));
|
||||
|
||||
bool
|
||||
ICGetProp_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -7985,7 +7987,7 @@ DoSetPropFallback(JSContext *cx, BaselineFrame *frame, ICSetProp_Fallback *stub_
|
|||
typedef bool (*DoSetPropFallbackFn)(JSContext *, BaselineFrame *, ICSetProp_Fallback *,
|
||||
HandleValue, HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoSetPropFallbackInfo =
|
||||
FunctionInfo<DoSetPropFallbackFn>(DoSetPropFallback, PopValues(2));
|
||||
FunctionInfo<DoSetPropFallbackFn>(DoSetPropFallback, TailCall, PopValues(2));
|
||||
|
||||
bool
|
||||
ICSetProp_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -10484,7 +10486,7 @@ DoIteratorNewFallback(JSContext *cx, BaselineFrame *frame, ICIteratorNew_Fallbac
|
|||
typedef bool (*DoIteratorNewFallbackFn)(JSContext *, BaselineFrame *, ICIteratorNew_Fallback *,
|
||||
HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoIteratorNewFallbackInfo =
|
||||
FunctionInfo<DoIteratorNewFallbackFn>(DoIteratorNewFallback, PopValues(1));
|
||||
FunctionInfo<DoIteratorNewFallbackFn>(DoIteratorNewFallback, TailCall, PopValues(1));
|
||||
|
||||
bool
|
||||
ICIteratorNew_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -10540,7 +10542,7 @@ DoIteratorMoreFallback(JSContext *cx, BaselineFrame *frame, ICIteratorMore_Fallb
|
|||
typedef bool (*DoIteratorMoreFallbackFn)(JSContext *, BaselineFrame *, ICIteratorMore_Fallback *,
|
||||
HandleObject, MutableHandleValue);
|
||||
static const VMFunction DoIteratorMoreFallbackInfo =
|
||||
FunctionInfo<DoIteratorMoreFallbackFn>(DoIteratorMoreFallback);
|
||||
FunctionInfo<DoIteratorMoreFallbackFn>(DoIteratorMoreFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICIteratorMore_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -10619,7 +10621,7 @@ DoIteratorCloseFallback(JSContext *cx, ICIteratorClose_Fallback *stub, HandleVal
|
|||
|
||||
typedef bool (*DoIteratorCloseFallbackFn)(JSContext *, ICIteratorClose_Fallback *, HandleValue);
|
||||
static const VMFunction DoIteratorCloseFallbackInfo =
|
||||
FunctionInfo<DoIteratorCloseFallbackFn>(DoIteratorCloseFallback);
|
||||
FunctionInfo<DoIteratorCloseFallbackFn>(DoIteratorCloseFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICIteratorClose_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -10666,7 +10668,7 @@ DoInstanceOfFallback(JSContext *cx, ICInstanceOf_Fallback *stub,
|
|||
typedef bool (*DoInstanceOfFallbackFn)(JSContext *, ICInstanceOf_Fallback *, HandleValue, HandleValue,
|
||||
MutableHandleValue);
|
||||
static const VMFunction DoInstanceOfFallbackInfo =
|
||||
FunctionInfo<DoInstanceOfFallbackFn>(DoInstanceOfFallback, PopValues(2));
|
||||
FunctionInfo<DoInstanceOfFallbackFn>(DoInstanceOfFallback, TailCall, PopValues(2));
|
||||
|
||||
bool
|
||||
ICInstanceOf_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -10715,7 +10717,7 @@ DoTypeOfFallback(JSContext *cx, BaselineFrame *frame, ICTypeOf_Fallback *stub, H
|
|||
typedef bool (*DoTypeOfFallbackFn)(JSContext *, BaselineFrame *frame, ICTypeOf_Fallback *,
|
||||
HandleValue, MutableHandleValue);
|
||||
static const VMFunction DoTypeOfFallbackInfo =
|
||||
FunctionInfo<DoTypeOfFallbackFn>(DoTypeOfFallback);
|
||||
FunctionInfo<DoTypeOfFallbackFn>(DoTypeOfFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICTypeOf_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -10806,7 +10808,7 @@ typedef bool(*DoRetSubFallbackFn)(JSContext *cx, BaselineFrame *, ICRetSub_Fallb
|
|||
static const VMFunction DoRetSubFallbackInfo = FunctionInfo<DoRetSubFallbackFn>(DoRetSubFallback);
|
||||
|
||||
typedef bool (*ThrowFn)(JSContext *, HandleValue);
|
||||
static const VMFunction ThrowInfoBaseline = FunctionInfo<ThrowFn>(js::Throw);
|
||||
static const VMFunction ThrowInfoBaseline = FunctionInfo<ThrowFn>(js::Throw, TailCall);
|
||||
|
||||
bool
|
||||
ICRetSub_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
@ -11529,7 +11531,7 @@ static bool DoRestFallback(JSContext *cx, ICRest_Fallback *stub,
|
|||
typedef bool (*DoRestFallbackFn)(JSContext *, ICRest_Fallback *, BaselineFrame *,
|
||||
MutableHandleValue);
|
||||
static const VMFunction DoRestFallbackInfo =
|
||||
FunctionInfo<DoRestFallbackFn>(DoRestFallback);
|
||||
FunctionInfo<DoRestFallbackFn>(DoRestFallback, TailCall);
|
||||
|
||||
bool
|
||||
ICRest_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
|
|
|
@ -1095,7 +1095,10 @@ PrepareAndExecuteRegExp(JSContext *cx, MacroAssembler &masm, Register regexp, Re
|
|||
RegExpStatics *res = cx->global()->getRegExpStatics(cx);
|
||||
if (!res)
|
||||
return false;
|
||||
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
if (mode != RegExpShared::MatchOnly)
|
||||
masm.pushReturnAddress();
|
||||
#endif
|
||||
if (mode == RegExpShared::Normal) {
|
||||
// First, fill in a skeletal MatchPairs instance on the stack. This will be
|
||||
// passed to the OOL stub in the caller if we aren't able to execute the
|
||||
|
@ -1573,6 +1576,10 @@ JitCompartment::generateRegExpTestStub(JSContext *cx)
|
|||
|
||||
MacroAssembler masm(cx);
|
||||
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
masm.pushReturnAddress();
|
||||
#endif
|
||||
|
||||
masm.reserveStack(sizeof(irregexp::InputOutputData));
|
||||
|
||||
Label notFound, oolEntry;
|
||||
|
@ -6173,7 +6180,9 @@ JitCompartment::generateStringConcatStub(JSContext *cx, ExecutionMode mode)
|
|||
Register forkJoinContext = CallTempReg4;
|
||||
|
||||
Label failure, failurePopTemps;
|
||||
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
masm.pushReturnAddress();
|
||||
#endif
|
||||
// If lhs is empty, return rhs.
|
||||
Label leftEmpty;
|
||||
masm.loadStringLength(lhs, temp1);
|
||||
|
@ -6284,6 +6293,9 @@ JitRuntime::generateMallocStub(JSContext *cx)
|
|||
MacroAssembler masm(cx);
|
||||
|
||||
RegisterSet regs = RegisterSet::Volatile();
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
masm.pushReturnAddress();
|
||||
#endif
|
||||
regs.takeUnchecked(regNBytes);
|
||||
masm.PushRegsInMask(regs);
|
||||
|
||||
|
@ -6319,7 +6331,9 @@ JitRuntime::generateFreeStub(JSContext *cx)
|
|||
const Register regSlots = CallTempReg0;
|
||||
|
||||
MacroAssembler masm(cx);
|
||||
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
masm.pushReturnAddress();
|
||||
#endif
|
||||
RegisterSet regs = RegisterSet::Volatile();
|
||||
regs.takeUnchecked(regSlots);
|
||||
masm.PushRegsInMask(regs);
|
||||
|
@ -6352,15 +6366,26 @@ JitCode *
|
|||
JitRuntime::generateLazyLinkStub(JSContext *cx)
|
||||
{
|
||||
MacroAssembler masm(cx);
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
masm.push(lr);
|
||||
#endif
|
||||
|
||||
Label call;
|
||||
GeneralRegisterSet regs = GeneralRegisterSet::Volatile();
|
||||
Register temp0 = regs.takeAny();
|
||||
|
||||
masm.callWithExitFrame(&call);
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
// sigh, this should probably attempt to bypass the push lr that starts off the block
|
||||
// but oh well.
|
||||
masm.pop(lr);
|
||||
#endif
|
||||
masm.jump(ReturnReg);
|
||||
|
||||
masm.bind(&call);
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
masm.push(lr);
|
||||
#endif
|
||||
masm.enterExitFrame();
|
||||
masm.setupUnalignedABICall(1, temp0);
|
||||
masm.loadJSContext(temp0);
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "jit/PerfSpewer.h"
|
||||
#include "jit/RangeAnalysis.h"
|
||||
#include "jit/ScalarReplacement.h"
|
||||
#include "jit/Sink.h"
|
||||
#include "jit/StupidAllocator.h"
|
||||
#include "jit/ValueNumbering.h"
|
||||
#include "vm/ForkJoin.h"
|
||||
|
@ -1562,6 +1563,17 @@ OptimizeMIR(MIRGenerator *mir)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (mir->optimizationInfo().sinkEnabled()) {
|
||||
AutoTraceLog log(logger, TraceLogger::EliminateDeadCode);
|
||||
if (!Sink(mir, graph))
|
||||
return false;
|
||||
IonSpewPass("Sink");
|
||||
AssertExtendedGraphCoherency(graph);
|
||||
|
||||
if (mir->shouldCancel("Sink"))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make loops contiguous. We do this after GVN/UCE and range analysis,
|
||||
// which can remove CFG edges, exposing more blocks that can be moved.
|
||||
{
|
||||
|
|
|
@ -569,10 +569,6 @@ jit::EliminateDeadCode(MIRGenerator *mir, MIRGraph &graph)
|
|||
if (js::jit::IsDiscardable(inst))
|
||||
{
|
||||
block->discard(inst);
|
||||
} else if (!inst->isRecoveredOnBailout() && !inst->isGuard() &&
|
||||
!inst->hasLiveDefUses() && inst->canRecoverOnBailout())
|
||||
{
|
||||
inst->setRecoveredOnBailout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8204,8 +8204,12 @@ IonBuilder::jsop_setelem()
|
|||
if (!setElemTryArguments(&emitted, object, index, value) || emitted)
|
||||
return emitted;
|
||||
|
||||
if (script()->argumentsHasVarBinding() && object->mightBeType(MIRType_MagicOptimizedArguments))
|
||||
if (script()->argumentsHasVarBinding() &&
|
||||
object->mightBeType(MIRType_MagicOptimizedArguments) &&
|
||||
info().executionMode() != ArgumentsUsageAnalysis)
|
||||
{
|
||||
return abort("Type is not definitely lazy arguments.");
|
||||
}
|
||||
|
||||
if (!setElemTryCache(&emitted, object, index, value) || emitted)
|
||||
return emitted;
|
||||
|
|
|
@ -33,6 +33,7 @@ OptimizationInfo::initNormalOptimizationInfo()
|
|||
rangeAnalysis_ = true;
|
||||
loopUnrolling_ = true;
|
||||
autoTruncate_ = true;
|
||||
sink_ = true;
|
||||
registerAllocator_ = RegisterAllocator_LSRA;
|
||||
|
||||
inlineMaxTotalBytecodeLength_ = 1000;
|
||||
|
@ -58,6 +59,7 @@ OptimizationInfo::initAsmjsOptimizationInfo()
|
|||
edgeCaseAnalysis_ = false;
|
||||
eliminateRedundantChecks_ = false;
|
||||
autoTruncate_ = false;
|
||||
sink_ = false;
|
||||
registerAllocator_ = RegisterAllocator_Backtracking;
|
||||
scalarReplacement_ = false; // AsmJS has no objects.
|
||||
}
|
||||
|
|
|
@ -76,6 +76,9 @@ class OptimizationInfo
|
|||
// Toggles whether Truncation based on Range Analysis is used.
|
||||
bool autoTruncate_;
|
||||
|
||||
// Toggles whether sink is used.
|
||||
bool sink_;
|
||||
|
||||
// Describes which register allocator to use.
|
||||
IonRegisterAllocator registerAllocator_;
|
||||
|
||||
|
@ -153,6 +156,10 @@ class OptimizationInfo
|
|||
return autoTruncate_ && rangeAnalysisEnabled();
|
||||
}
|
||||
|
||||
bool sinkEnabled() const {
|
||||
return sink_ && !js_JitOptions.disableSink;
|
||||
}
|
||||
|
||||
bool eaaEnabled() const {
|
||||
return eaa_ && !js_JitOptions.disableEaa;
|
||||
}
|
||||
|
|
|
@ -81,6 +81,9 @@ JitOptions::JitOptions()
|
|||
// Toggles whether Range Analysis is globally disabled.
|
||||
SET_DEFAULT(disableRangeAnalysis, false);
|
||||
|
||||
// Toggles whether sink code motion is globally disabled.
|
||||
SET_DEFAULT(disableSink, false);
|
||||
|
||||
// Toggles whether Loop Unrolling is globally disabled.
|
||||
SET_DEFAULT(disableLoopUnrolling, true);
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ struct JitOptions
|
|||
bool disableInlining;
|
||||
bool disableEdgeCaseAnalysis;
|
||||
bool disableRangeAnalysis;
|
||||
bool disableSink;
|
||||
bool disableLoopUnrolling;
|
||||
bool disableEaa;
|
||||
bool eagerCompilation;
|
||||
|
|
|
@ -240,6 +240,7 @@ jit::CheckLogging()
|
|||
" alias Alias analysis\n"
|
||||
" gvn Global Value Numbering\n"
|
||||
" licm Loop invariant code motion\n"
|
||||
" sink Sink transformation\n"
|
||||
" regalloc Register allocation\n"
|
||||
" inline Inlining\n"
|
||||
" snapshots Snapshot information\n"
|
||||
|
@ -288,6 +289,8 @@ jit::CheckLogging()
|
|||
EnableChannel(JitSpew_Unrolling);
|
||||
if (ContainsFlag(env, "licm"))
|
||||
EnableChannel(JitSpew_LICM);
|
||||
if (ContainsFlag(env, "sink"))
|
||||
EnableChannel(JitSpew_Sink);
|
||||
if (ContainsFlag(env, "regalloc"))
|
||||
EnableChannel(JitSpew_RegAlloc);
|
||||
if (ContainsFlag(env, "inline"))
|
||||
|
|
|
@ -26,6 +26,8 @@ namespace jit {
|
|||
_(Alias) \
|
||||
/* Information during GVN */ \
|
||||
_(GVN) \
|
||||
/* Information during sinking */ \
|
||||
_(Sink) \
|
||||
/* Information during Range analysis */ \
|
||||
_(Range) \
|
||||
/* Information during loop unrolling */ \
|
||||
|
|
|
@ -795,6 +795,27 @@ MBasicBlock::moveBefore(MInstruction *at, MInstruction *ins)
|
|||
ins->setTrackedSite(at->trackedSite());
|
||||
}
|
||||
|
||||
MInstruction *
|
||||
MBasicBlock::safeInsertTop(MDefinition *ins, IgnoreTop ignore)
|
||||
{
|
||||
// Beta nodes and interrupt checks are required to be located at the
|
||||
// beginnings of basic blocks, so we must insert new instructions after any
|
||||
// such instructions.
|
||||
MInstructionIterator insertIter = !ins || ins->isPhi()
|
||||
? begin()
|
||||
: begin(ins->toInstruction());
|
||||
while (insertIter->isBeta() ||
|
||||
insertIter->isInterruptCheck() ||
|
||||
insertIter->isInterruptCheckPar() ||
|
||||
insertIter->isConstant() ||
|
||||
(!(ignore & IgnoreRecover) && insertIter->isRecoveredOnBailout()))
|
||||
{
|
||||
insertIter++;
|
||||
}
|
||||
|
||||
return *insertIter;
|
||||
}
|
||||
|
||||
void
|
||||
MBasicBlock::discardResumePoint(MResumePoint *rp, ReferencesType refType /* = RefType_Default */)
|
||||
{
|
||||
|
|
|
@ -286,6 +286,15 @@ class MBasicBlock : public TempObject, public InlineListNode<MBasicBlock>
|
|||
// Move an instruction. Movement may cross block boundaries.
|
||||
void moveBefore(MInstruction *at, MInstruction *ins);
|
||||
|
||||
enum IgnoreTop {
|
||||
IgnoreNone = 0,
|
||||
IgnoreRecover = 1 << 0
|
||||
};
|
||||
|
||||
// Locate the top of the |block|, where it is safe to insert a new
|
||||
// instruction.
|
||||
MInstruction *safeInsertTop(MDefinition *ins = nullptr, IgnoreTop ignore = IgnoreNone);
|
||||
|
||||
// Removes an instruction with the intention to discard it.
|
||||
void discard(MInstruction *ins);
|
||||
void discardLastIns();
|
||||
|
|
|
@ -2263,22 +2263,12 @@ RangeAnalysis::addRangeAssertions()
|
|||
// Beta nodes and interrupt checks are required to be located at the
|
||||
// beginnings of basic blocks, so we must insert range assertions
|
||||
// after any such instructions.
|
||||
MInstructionIterator insertIter = ins->isPhi()
|
||||
? block->begin()
|
||||
: block->begin(ins->toInstruction());
|
||||
while (insertIter->isBeta() ||
|
||||
insertIter->isInterruptCheck() ||
|
||||
insertIter->isInterruptCheckPar() ||
|
||||
insertIter->isConstant() ||
|
||||
insertIter->isRecoveredOnBailout())
|
||||
{
|
||||
insertIter++;
|
||||
}
|
||||
MInstruction *insertAt = block->safeInsertTop(ins);
|
||||
|
||||
if (*insertIter == *iter)
|
||||
block->insertAfter(*insertIter, guard);
|
||||
if (insertAt == *iter)
|
||||
block->insertAfter(insertAt, guard);
|
||||
else
|
||||
block->insertBefore(*insertIter, guard);
|
||||
block->insertBefore(insertAt, guard);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,202 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "jit/Sink.h"
|
||||
|
||||
#include "mozilla/Vector.h"
|
||||
|
||||
#include "jit/IonAnalysis.h"
|
||||
#include "jit/JitSpewer.h"
|
||||
#include "jit/MIR.h"
|
||||
#include "jit/MIRGenerator.h"
|
||||
#include "jit/MIRGraph.h"
|
||||
|
||||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
// Given the last found common dominator and a new definition to dominate, the
|
||||
// CommonDominator function returns the basic block which dominate the last
|
||||
// common dominator and the definition. If no such block exists, then this
|
||||
// functions return null.
|
||||
static MBasicBlock *
|
||||
CommonDominator(MBasicBlock *commonDominator, MBasicBlock *defBlock)
|
||||
{
|
||||
// This is the first instruction visited, record its basic block as being
|
||||
// the only interesting one.
|
||||
if (!commonDominator)
|
||||
return defBlock;
|
||||
|
||||
// Iterate on immediate dominators of the known common dominator to find a
|
||||
// block which dominates all previous uses as well as this instruction.
|
||||
while (!commonDominator->dominates(defBlock)) {
|
||||
MBasicBlock *nextBlock = commonDominator->immediateDominator();
|
||||
// All uses are dominated, so, this cannot happen unless the graph
|
||||
// coherency is not respected.
|
||||
MOZ_ASSERT(commonDominator != nextBlock);
|
||||
commonDominator = nextBlock;
|
||||
}
|
||||
|
||||
return commonDominator;
|
||||
}
|
||||
|
||||
bool
|
||||
Sink(MIRGenerator *mir, MIRGraph &graph)
|
||||
{
|
||||
TempAllocator &alloc = graph.alloc();
|
||||
|
||||
for (PostorderIterator block = graph.poBegin(); block != graph.poEnd(); block++) {
|
||||
if (mir->shouldCancel("Sink"))
|
||||
return false;
|
||||
|
||||
for (MInstructionReverseIterator iter = block->rbegin(); iter != block->rend(); ) {
|
||||
MInstruction *ins = *iter++;
|
||||
|
||||
// Only instructions which can be recovered on bailout can be moved
|
||||
// into the bailout paths.
|
||||
if (ins->isGuard() || ins->isRecoveredOnBailout() || !ins->canRecoverOnBailout())
|
||||
continue;
|
||||
|
||||
// Compute a common dominator for all uses of the current
|
||||
// instruction.
|
||||
bool hasLiveUses = false;
|
||||
bool hasUses = false;
|
||||
MBasicBlock *usesDominator = nullptr;
|
||||
for (MUseIterator i(ins->usesBegin()), e(ins->usesEnd()); i != e; i++) {
|
||||
hasUses = true;
|
||||
MNode *consumerNode = (*i)->consumer();
|
||||
if (consumerNode->isResumePoint())
|
||||
continue;
|
||||
|
||||
MDefinition *consumer = consumerNode->toDefinition();
|
||||
if (consumer->isRecoveredOnBailout())
|
||||
continue;
|
||||
|
||||
hasLiveUses = true;
|
||||
|
||||
// If the instruction is a Phi, then we should dominate the
|
||||
// predecessor from which the value is coming from.
|
||||
MBasicBlock *consumerBlock = consumer->block();
|
||||
if (consumer->isPhi())
|
||||
consumerBlock = consumerBlock->getPredecessor(consumer->indexOf(*i));
|
||||
|
||||
usesDominator = CommonDominator(usesDominator, consumerBlock);
|
||||
if (usesDominator == *block)
|
||||
break;
|
||||
}
|
||||
|
||||
// Leave this instruction for DCE.
|
||||
if (!hasUses)
|
||||
continue;
|
||||
|
||||
// We have no uses, so sink this instruction in all the bailout
|
||||
// paths.
|
||||
if (!hasLiveUses) {
|
||||
MOZ_ASSERT(!usesDominator);
|
||||
ins->setRecoveredOnBailout();
|
||||
JitSpewDef(JitSpew_Sink, " No live uses, recover the instruction on bailout\n", ins);
|
||||
continue;
|
||||
}
|
||||
|
||||
// If all the uses are under a loop, we might not want to work
|
||||
// against LICM by moving everything back into the loop, but if the
|
||||
// loop is it-self inside an if, then we still want to move the
|
||||
// computation under this if statement.
|
||||
while (block->loopDepth() < usesDominator->loopDepth()) {
|
||||
MOZ_ASSERT(usesDominator != usesDominator->immediateDominator());
|
||||
usesDominator = usesDominator->immediateDominator();
|
||||
}
|
||||
|
||||
// Only move instructions if there is a branch between the dominator
|
||||
// of the uses and the original instruction. This prevent moving the
|
||||
// computation of the arguments into an inline function if there is
|
||||
// no major win.
|
||||
MBasicBlock *lastJoin = usesDominator;
|
||||
while (*block != lastJoin && lastJoin->numPredecessors() == 1) {
|
||||
MOZ_ASSERT(lastJoin != lastJoin->immediateDominator());
|
||||
MBasicBlock *next = lastJoin->immediateDominator();
|
||||
if (next->numSuccessors() > 1)
|
||||
break;
|
||||
lastJoin = next;
|
||||
}
|
||||
if (*block == lastJoin)
|
||||
continue;
|
||||
|
||||
// Skip to the next instruction if we cannot find a common dominator
|
||||
// for all the uses of this instruction, or if the common dominator
|
||||
// correspond to the block of the current instruction.
|
||||
if (!usesDominator || usesDominator == *block)
|
||||
continue;
|
||||
|
||||
// Only instruction which can be recovered on bailout and which are
|
||||
// sinkable can be moved into blocks which are below while filling
|
||||
// the resume points with a clone which is recovered on bailout.
|
||||
|
||||
// If the instruction has live uses and if it is clonable, then we
|
||||
// can clone the instruction for all non-dominated uses and move the
|
||||
// instruction into the block which is dominating all live uses.
|
||||
if (!ins->canClone())
|
||||
continue;
|
||||
|
||||
JitSpewDef(JitSpew_Sink, " Can Clone & Recover, sink instruction\n", ins);
|
||||
JitSpew(JitSpew_Sink, " into Block %u", usesDominator->id());
|
||||
|
||||
// Copy the arguments and clone the instruction.
|
||||
MDefinitionVector operands(alloc);
|
||||
for (size_t i = 0, end = ins->numOperands(); i < end; i++) {
|
||||
if (!operands.append(ins->getOperand(i)))
|
||||
return false;
|
||||
}
|
||||
|
||||
MInstruction *clone = ins->clone(alloc, operands);
|
||||
ins->block()->insertBefore(ins, clone);
|
||||
clone->setRecoveredOnBailout();
|
||||
|
||||
// We should not update the producer of the entry resume point, as
|
||||
// it cannot refer to any instruction within the basic block excepts
|
||||
// for Phi nodes.
|
||||
MResumePoint *entry = usesDominator->entryResumePoint();
|
||||
|
||||
// Replace the instruction by its clone in all the resume points /
|
||||
// recovered-on-bailout instructions which are not in blocks which
|
||||
// are dominated by the usesDominator block.
|
||||
for (MUseIterator i(ins->usesBegin()), e(ins->usesEnd()); i != e; ) {
|
||||
MUse *use = *i++;
|
||||
MNode *consumer = use->consumer();
|
||||
|
||||
// If the consumer is a Phi, then we look for the index of the
|
||||
// use to find the corresponding predecessor block, which is
|
||||
// then used as the consumer block.
|
||||
MBasicBlock *consumerBlock = consumer->block();
|
||||
if (consumer->isDefinition() && consumer->toDefinition()->isPhi()) {
|
||||
consumerBlock = consumerBlock->getPredecessor(
|
||||
consumer->toDefinition()->toPhi()->indexOf(use));
|
||||
}
|
||||
|
||||
// Keep the current instruction for all dominated uses, except
|
||||
// for the entry resume point of the block in which the
|
||||
// instruction would be moved into.
|
||||
if (usesDominator->dominates(consumerBlock) &&
|
||||
(!consumer->isResumePoint() || consumer->toResumePoint() != entry))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
use->replaceProducer(clone);
|
||||
}
|
||||
|
||||
// Now, that all uses which are not dominated by usesDominator are
|
||||
// using the cloned instruction, we can safely move the instruction
|
||||
// into the usesDominator block.
|
||||
MInstruction *at = usesDominator->safeInsertTop(nullptr, MBasicBlock::IgnoreRecover);
|
||||
block->moveBefore(at, ins);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// This file declares sink transformation.
|
||||
#ifndef jit_Sink_h
|
||||
#define jit_Sink_h
|
||||
|
||||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
class MIRGenerator;
|
||||
class MIRGraph;
|
||||
|
||||
bool
|
||||
Sink(MIRGenerator *mir, MIRGraph &graph);
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
||||
#endif /* jit_Sink_h */
|
|
@ -41,6 +41,11 @@ struct PopValues
|
|||
{ }
|
||||
};
|
||||
|
||||
enum MaybeTailCall {
|
||||
TailCall,
|
||||
NonTailCall
|
||||
};
|
||||
|
||||
// Contains information about a virtual machine function that can be called
|
||||
// from JIT code. Functions described in this manner must conform to a simple
|
||||
// protocol: the return type must have a special "failure" value (for example,
|
||||
|
@ -123,6 +128,11 @@ struct VMFunction
|
|||
// wrapper.
|
||||
uint32_t extraValuesToPop;
|
||||
|
||||
// On some architectures, called functions need to explicitly push their
|
||||
// return address, for a tail call, there is nothing to push, so tail-callness
|
||||
// needs to be known at compile time.
|
||||
MaybeTailCall expectTailCall;
|
||||
|
||||
uint32_t argc() const {
|
||||
// JSContext * + args + (OutParam? *)
|
||||
return 1 + explicitArgc() + ((outParam == Type_Void) ? 0 : 1);
|
||||
|
@ -227,7 +237,8 @@ struct VMFunction
|
|||
VMFunction(void *wrapped, uint32_t explicitArgs, uint32_t argumentProperties,
|
||||
uint32_t argumentPassedInFloatRegs, uint64_t argRootTypes,
|
||||
DataType outParam, RootType outParamRootType, DataType returnType,
|
||||
ExecutionMode executionMode, uint32_t extraValuesToPop = 0)
|
||||
ExecutionMode executionMode, uint32_t extraValuesToPop = 0,
|
||||
MaybeTailCall expectTailCall = NonTailCall)
|
||||
: wrapped(wrapped),
|
||||
explicitArgs(explicitArgs),
|
||||
argumentProperties(argumentProperties),
|
||||
|
@ -237,7 +248,8 @@ struct VMFunction
|
|||
argumentRootTypes(argRootTypes),
|
||||
outParamRootType(outParamRootType),
|
||||
executionMode(executionMode),
|
||||
extraValuesToPop(extraValuesToPop)
|
||||
extraValuesToPop(extraValuesToPop),
|
||||
expectTailCall(expectTailCall)
|
||||
{
|
||||
// Check for valid failure/return type.
|
||||
MOZ_ASSERT_IF(outParam != Type_Void && executionMode == SequentialExecution,
|
||||
|
@ -503,12 +515,20 @@ template <> struct MatchContext<ThreadSafeContext *> {
|
|||
static inline uint64_t argumentRootTypes() { \
|
||||
return ForEachNb(COMPUTE_ARG_ROOT, SEP_OR, NOTHING); \
|
||||
} \
|
||||
explicit FunctionInfo(pf fun, MaybeTailCall expectTailCall, \
|
||||
PopValues extraValuesToPop = PopValues(0)) \
|
||||
: VMFunction(JS_FUNC_TO_DATA_PTR(void *, fun), explicitArgs(), \
|
||||
argumentProperties(), argumentPassedInFloatRegs(), \
|
||||
argumentRootTypes(), outParam(), outParamRootType(), \
|
||||
returnType(), executionMode(), \
|
||||
extraValuesToPop.numValues, expectTailCall) \
|
||||
{ } \
|
||||
explicit FunctionInfo(pf fun, PopValues extraValuesToPop = PopValues(0)) \
|
||||
: VMFunction(JS_FUNC_TO_DATA_PTR(void *, fun), explicitArgs(), \
|
||||
argumentProperties(), argumentPassedInFloatRegs(), \
|
||||
argumentRootTypes(), outParam(), outParamRootType(), \
|
||||
returnType(), executionMode(), \
|
||||
extraValuesToPop.numValues) \
|
||||
extraValuesToPop.numValues, NonTailCall) \
|
||||
{ }
|
||||
|
||||
template <typename Fun>
|
||||
|
@ -548,7 +568,13 @@ struct FunctionInfo<R (*)(Context)> : public VMFunction {
|
|||
: VMFunction(JS_FUNC_TO_DATA_PTR(void *, fun), explicitArgs(),
|
||||
argumentProperties(), argumentPassedInFloatRegs(),
|
||||
argumentRootTypes(), outParam(), outParamRootType(),
|
||||
returnType(), executionMode())
|
||||
returnType(), executionMode(), 0, NonTailCall)
|
||||
{ }
|
||||
explicit FunctionInfo(pf fun, MaybeTailCall expectTailCall)
|
||||
: VMFunction(JS_FUNC_TO_DATA_PTR(void *, fun), explicitArgs(),
|
||||
argumentProperties(), argumentPassedInFloatRegs(),
|
||||
argumentRootTypes(), outParam(), outParamRootType(),
|
||||
returnType(), executionMode(), 0, expectTailCall)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -42,7 +42,9 @@ CodeGeneratorARM::generatePrologue()
|
|||
{
|
||||
MOZ_ASSERT(masm.framePushed() == 0);
|
||||
MOZ_ASSERT(!gen->compilingAsmJS());
|
||||
|
||||
#ifdef JS_USE_LINK_REGISTER
|
||||
masm.pushReturnAddress();
|
||||
#endif
|
||||
// Note that this automatically sets MacroAssembler::framePushed().
|
||||
masm.reserveStack(frameSize());
|
||||
masm.checkStackAlignment();
|
||||
|
|
|
@ -3715,8 +3715,7 @@ MacroAssemblerARM::ma_callIon(const Register r)
|
|||
// When the stack is 8 byte aligned, we want to decrement sp by 8, and write
|
||||
// pc + 8 into the new sp. When we return from this call, sp will be its
|
||||
// present value minus 4.
|
||||
AutoForbidPools afp(this, 2);
|
||||
as_dtr(IsStore, 32, PreIndex, pc, DTRAddr(sp, DtrOffImm(-8)));
|
||||
as_sub(sp, sp, Imm8(4));
|
||||
as_blx(r);
|
||||
}
|
||||
void
|
||||
|
@ -3724,8 +3723,9 @@ MacroAssemblerARM::ma_callIonNoPush(const Register r)
|
|||
{
|
||||
// Since we just write the return address into the stack, which is popped on
|
||||
// return, the net effect is removing 4 bytes from the stack.
|
||||
AutoForbidPools afp(this, 2);
|
||||
as_dtr(IsStore, 32, Offset, pc, DTRAddr(sp, DtrOffImm(0)));
|
||||
|
||||
// Bug 1103108: remove this function, and refactor all uses.
|
||||
as_add(sp, sp, Imm8(4));
|
||||
as_blx(r);
|
||||
}
|
||||
|
||||
|
@ -3735,19 +3735,18 @@ MacroAssemblerARM::ma_callIonHalfPush(const Register r)
|
|||
// The stack is unaligned by 4 bytes. We push the pc to the stack to align
|
||||
// the stack before the call, when we return the pc is poped and the stack
|
||||
// is restored to its unaligned state.
|
||||
AutoForbidPools afp(this, 2);
|
||||
ma_push(pc);
|
||||
as_blx(r);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARM::ma_callIonHalfPush(Label *label)
|
||||
{
|
||||
// The stack is unaligned by 4 bytes. We push the pc to the stack to align
|
||||
// the stack before the call, when we return the pc is poped and the stack
|
||||
// The stack is unaligned by 4 bytes. The callee will push the lr to the stack to align
|
||||
// the stack after the call, when we return the pc is poped and the stack
|
||||
// is restored to its unaligned state.
|
||||
AutoForbidPools afp(this, 2);
|
||||
ma_push(pc);
|
||||
|
||||
// leave the stack as-is so the callee-side can push when necessary.
|
||||
|
||||
as_bl(label, Always);
|
||||
}
|
||||
|
||||
|
|
|
@ -1833,6 +1833,9 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||
void loadAsmJSHeapRegisterFromGlobalData() {
|
||||
loadPtr(Address(GlobalReg, AsmJSHeapGlobalDataOffset - AsmJSGlobalRegBias), HeapReg);
|
||||
}
|
||||
void pushReturnAddress() {
|
||||
push(lr);
|
||||
}
|
||||
};
|
||||
|
||||
typedef MacroAssemblerARMCompat MacroAssemblerSpecific;
|
||||
|
|
|
@ -419,6 +419,8 @@ JitCode *
|
|||
JitRuntime::generateArgumentsRectifier(JSContext *cx, ExecutionMode mode, void **returnAddrOut)
|
||||
{
|
||||
MacroAssembler masm(cx);
|
||||
masm.pushReturnAddress();
|
||||
|
||||
// ArgumentsRectifierReg contains the |nargs| pushed onto the current frame.
|
||||
// Including |this|, there are (|nargs| + 1) arguments to copy.
|
||||
MOZ_ASSERT(ArgumentsRectifierReg == r8);
|
||||
|
@ -747,6 +749,10 @@ JitRuntime::generateVMWrapper(JSContext *cx, const VMFunction &f)
|
|||
// +0 ExitFrame
|
||||
//
|
||||
// We're aligned to an exit frame, so link it up.
|
||||
// If it isn't a tail call, then the return address needs to be saved
|
||||
if (f.expectTailCall == NonTailCall)
|
||||
masm.pushReturnAddress();
|
||||
|
||||
masm.enterExitFrameAndLoadContext(&f, cxreg, regs.getAny(), f.executionMode);
|
||||
|
||||
// Save the base of the argument set stored on the stack.
|
||||
|
@ -914,6 +920,7 @@ JitRuntime::generatePreBarrier(JSContext *cx, MIRType type)
|
|||
save = RegisterSet(GeneralRegisterSet(Registers::VolatileMask),
|
||||
FloatRegisterSet());
|
||||
}
|
||||
save.add(lr);
|
||||
masm.PushRegsInMask(save);
|
||||
|
||||
MOZ_ASSERT(PreBarrierReg == r1);
|
||||
|
@ -923,9 +930,9 @@ JitRuntime::generatePreBarrier(JSContext *cx, MIRType type)
|
|||
masm.passABIArg(r0);
|
||||
masm.passABIArg(r1);
|
||||
masm.callWithABI(IonMarkFunction(type));
|
||||
|
||||
save.take(AnyRegister(lr));
|
||||
save.add(pc);
|
||||
masm.PopRegsInMask(save);
|
||||
masm.ret();
|
||||
|
||||
Linker linker(masm);
|
||||
AutoFlushICache afc("PreBarrier");
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
#include "jit/RegisterSets.h"
|
||||
#include "vm/HelperThreads.h"
|
||||
|
||||
#if defined(JS_CODEGEN_ARM)
|
||||
#define JS_USE_LINK_REGISTER
|
||||
#endif
|
||||
|
||||
#if defined(JS_CODEGEN_X64) || defined(JS_CODEGEN_ARM)
|
||||
// JS_SMALL_BRANCH means the range on a branch instruction
|
||||
// is smaller than the whole address space
|
||||
|
|
|
@ -90,7 +90,7 @@ BaselineCompilerShared::callVM(const VMFunction &fun, CallVMPhase phase)
|
|||
masm.makeFrameDescriptor(BaselineTailCallReg, JitFrame_BaselineJS);
|
||||
masm.push(BaselineTailCallReg);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(fun.expectTailCall == NonTailCall);
|
||||
// Perform the call.
|
||||
masm.call(code);
|
||||
uint32_t callOffset = masm.currentOffset();
|
||||
|
|
|
@ -2677,6 +2677,8 @@ CodeGeneratorX86Shared::visitSimdShuffle(LSimdShuffle *ins)
|
|||
bool
|
||||
CodeGeneratorX86Shared::visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *ins)
|
||||
{
|
||||
static const SimdConstant allOnes = SimdConstant::SplatX4(-1);
|
||||
|
||||
FloatRegister lhs = ToFloatRegister(ins->lhs());
|
||||
Operand rhs = ToOperand(ins->rhs());
|
||||
MOZ_ASSERT(ToFloatRegister(ins->output()) == lhs);
|
||||
|
@ -2690,22 +2692,41 @@ CodeGeneratorX86Shared::visitSimdBinaryCompIx4(LSimdBinaryCompIx4 *ins)
|
|||
masm.packedEqualInt32x4(rhs, lhs);
|
||||
return true;
|
||||
case MSimdBinaryComp::lessThan:
|
||||
// scr := rhs
|
||||
// src := rhs
|
||||
if (rhs.kind() == Operand::FPREG)
|
||||
masm.moveAlignedInt32x4(ToFloatRegister(ins->rhs()), ScratchSimdReg);
|
||||
else
|
||||
masm.loadAlignedInt32x4(rhs, ScratchSimdReg);
|
||||
|
||||
// scr := scr > lhs (i.e. lhs < rhs)
|
||||
// src := src > lhs (i.e. lhs < rhs)
|
||||
// Improve by doing custom lowering (rhs is tied to the output register)
|
||||
masm.packedGreaterThanInt32x4(ToOperand(ins->lhs()), ScratchSimdReg);
|
||||
masm.moveAlignedInt32x4(ScratchSimdReg, lhs);
|
||||
return true;
|
||||
case MSimdBinaryComp::notEqual:
|
||||
// Ideally for notEqual, greaterThanOrEqual, and lessThanOrEqual, we
|
||||
// should invert the comparison by, e.g. swapping the arms of a select
|
||||
// if that's what it's used in.
|
||||
masm.loadConstantInt32x4(allOnes, ScratchSimdReg);
|
||||
masm.packedEqualInt32x4(rhs, lhs);
|
||||
masm.bitwiseXorX4(Operand(ScratchSimdReg), lhs);
|
||||
return true;
|
||||
case MSimdBinaryComp::greaterThanOrEqual:
|
||||
// src := rhs
|
||||
if (rhs.kind() == Operand::FPREG)
|
||||
masm.moveAlignedInt32x4(ToFloatRegister(ins->rhs()), ScratchSimdReg);
|
||||
else
|
||||
masm.loadAlignedInt32x4(rhs, ScratchSimdReg);
|
||||
masm.packedGreaterThanInt32x4(ToOperand(ins->lhs()), ScratchSimdReg);
|
||||
masm.loadConstantInt32x4(allOnes, lhs);
|
||||
masm.bitwiseXorX4(Operand(ScratchSimdReg), lhs);
|
||||
return true;
|
||||
case MSimdBinaryComp::lessThanOrEqual:
|
||||
// These operations are not part of the spec. so are not implemented.
|
||||
break;
|
||||
// lhs <= rhs is equivalent to !(rhs < lhs), which we compute here.
|
||||
masm.loadConstantInt32x4(allOnes, ScratchSimdReg);
|
||||
masm.packedGreaterThanInt32x4(rhs, lhs);
|
||||
masm.bitwiseXorX4(Operand(ScratchSimdReg), lhs);
|
||||
return true;
|
||||
}
|
||||
MOZ_CRASH("unexpected SIMD op");
|
||||
}
|
||||
|
|
|
@ -2732,9 +2732,15 @@ GCRuntime::unprotectRelocatedArenas(ArenaHeader *relocatedList)
|
|||
void
|
||||
GCRuntime::releaseRelocatedArenas(ArenaHeader *relocatedList)
|
||||
{
|
||||
// Release the relocated arenas, now containing only forwarding pointers
|
||||
AutoLockGC lock(rt);
|
||||
releaseRelocatedArenasWithoutUnlocking(relocatedList, lock);
|
||||
expireChunksAndArenas(true, lock);
|
||||
}
|
||||
|
||||
void
|
||||
GCRuntime::releaseRelocatedArenasWithoutUnlocking(ArenaHeader *relocatedList, const AutoLockGC &lock)
|
||||
{
|
||||
// Release the relocated arenas, now containing only forwarding pointers
|
||||
unsigned count = 0;
|
||||
while (relocatedList) {
|
||||
ArenaHeader *aheader = relocatedList;
|
||||
|
@ -2759,8 +2765,6 @@ GCRuntime::releaseRelocatedArenas(ArenaHeader *relocatedList)
|
|||
releaseArena(aheader, lock);
|
||||
++count;
|
||||
}
|
||||
|
||||
expireChunksAndArenas(true, lock);
|
||||
}
|
||||
|
||||
#endif // JSGC_COMPACTING
|
||||
|
@ -6406,6 +6410,13 @@ GCRuntime::onOutOfMallocMemory(const AutoLockGC &lock)
|
|||
// Throw away any excess chunks we have lying around.
|
||||
freeEmptyChunks(rt, lock);
|
||||
|
||||
// Release any relocated areans we may be holding on to.
|
||||
#if defined(JSGC_COMPACTING) && defined(DEBUG)
|
||||
unprotectRelocatedArenas(relocatedArenasToRelease);
|
||||
releaseRelocatedArenasWithoutUnlocking(relocatedArenasToRelease, lock);
|
||||
relocatedArenasToRelease = nullptr;
|
||||
#endif
|
||||
|
||||
// Immediately decommit as many arenas as possible in the hopes that this
|
||||
// might let the OS scrape together enough pages to satisfy the failing
|
||||
// malloc request.
|
||||
|
|
|
@ -190,6 +190,7 @@ UNIFIED_SOURCES += [
|
|||
'jit/shared/BaselineCompiler-shared.cpp',
|
||||
'jit/shared/CodeGenerator-shared.cpp',
|
||||
'jit/shared/Lowering-shared.cpp',
|
||||
'jit/Sink.cpp',
|
||||
'jit/Snapshots.cpp',
|
||||
'jit/StupidAllocator.cpp',
|
||||
'jit/TypedObjectPrediction.cpp',
|
||||
|
|
|
@ -5500,6 +5500,15 @@ SetRuntimeOptions(JSRuntime *rt, const OptionParser &op)
|
|||
return OptionFailure("ion-range-analysis", str);
|
||||
}
|
||||
|
||||
if (const char *str = op.getStringOption("ion-sink")) {
|
||||
if (strcmp(str, "on") == 0)
|
||||
jit::js_JitOptions.disableSink = false;
|
||||
else if (strcmp(str, "off") == 0)
|
||||
jit::js_JitOptions.disableSink = true;
|
||||
else
|
||||
return OptionFailure("ion-sink", str);
|
||||
}
|
||||
|
||||
if (const char *str = op.getStringOption("ion-loop-unrolling")) {
|
||||
if (strcmp(str, "on") == 0)
|
||||
jit::js_JitOptions.disableLoopUnrolling = false;
|
||||
|
@ -5797,6 +5806,8 @@ main(int argc, char **argv, char **envp)
|
|||
"Find edge cases where Ion can avoid bailouts (default: on, off to disable)")
|
||||
|| !op.addStringOption('\0', "ion-range-analysis", "on/off",
|
||||
"Range analysis (default: on, off to disable)")
|
||||
|| !op.addStringOption('\0', "ion-sink", "on/off",
|
||||
"Sink code motion (default: on, off to disable)")
|
||||
|| !op.addStringOption('\0', "ion-loop-unrolling", "on/off",
|
||||
"Loop unrolling (default: off, on to enable)")
|
||||
|| !op.addBoolOption('\0', "ion-check-range-analysis",
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
|
||||
/*
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* https://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var fround = Math.fround;
|
||||
|
||||
function boolToSimdLogical(b) {
|
||||
return b ? 0xFFFFFFFF | 0 : 0x0;
|
||||
}
|
||||
|
||||
function testEqualFloat32x4(v, w) {
|
||||
testBinaryFunc(v, w, float32x4.equal, (x, y) => boolToSimdLogical(fround(x) == fround(y)));
|
||||
}
|
||||
function testNotEqualFloat32x4(v, w) {
|
||||
testBinaryFunc(v, w, float32x4.notEqual, (x, y) => boolToSimdLogical(fround(x) != fround(y)));
|
||||
}
|
||||
function testLessThanFloat32x4(v, w) {
|
||||
testBinaryFunc(v, w, float32x4.lessThan, (x, y) => boolToSimdLogical(fround(x) < fround(y)));
|
||||
}
|
||||
function testLessThanOrEqualFloat32x4(v, w) {
|
||||
testBinaryFunc(v, w, float32x4.lessThanOrEqual, (x, y) => boolToSimdLogical(fround(x) <= fround(y)));
|
||||
}
|
||||
function testGreaterThanFloat32x4(v, w) {
|
||||
testBinaryFunc(v, w, float32x4.greaterThan, (x, y) => boolToSimdLogical(fround(x) > fround(y)));
|
||||
}
|
||||
function testGreaterThanOrEqualFloat32x4(v, w) {
|
||||
testBinaryFunc(v, w, float32x4.greaterThanOrEqual, (x, y) => boolToSimdLogical(fround(x) >= fround(y)));
|
||||
}
|
||||
|
||||
function testEqualInt32x4(v, w) {
|
||||
testBinaryFunc(v, w, int32x4.equal, (x, y) => boolToSimdLogical(x == y));
|
||||
}
|
||||
function testNotEqualInt32x4(v, w) {
|
||||
testBinaryFunc(v, w, int32x4.notEqual, (x, y) => boolToSimdLogical(x != y));
|
||||
}
|
||||
function testLessThanInt32x4(v, w) {
|
||||
testBinaryFunc(v, w, int32x4.lessThan, (x, y) => boolToSimdLogical(x < y));
|
||||
}
|
||||
function testLessThanOrEqualInt32x4(v, w) {
|
||||
testBinaryFunc(v, w, int32x4.lessThanOrEqual, (x, y) => boolToSimdLogical(x <= y));
|
||||
}
|
||||
function testGreaterThanInt32x4(v, w) {
|
||||
testBinaryFunc(v, w, int32x4.greaterThan, (x, y) => boolToSimdLogical(x > y));
|
||||
}
|
||||
function testGreaterThanOrEqualInt32x4(v, w) {
|
||||
testBinaryFunc(v, w, int32x4.greaterThanOrEqual, (x, y) => boolToSimdLogical(x >= y));
|
||||
}
|
||||
|
||||
function test() {
|
||||
var float32x4val = [
|
||||
float32x4(1, 20, 30, 4),
|
||||
float32x4(10, 2, 3, 40),
|
||||
float32x4(9.999, 2.1234, 30.4443, 4),
|
||||
float32x4(10, 2.1233, 30.4444, 4.0001),
|
||||
float32x4(NaN, -Infinity, +Infinity, -0),
|
||||
float32x4(+Infinity, NaN, -0, -Infinity),
|
||||
float32x4(13.37, 42.42, NaN, 0)
|
||||
];
|
||||
|
||||
var v, w;
|
||||
for (v of float32x4val) {
|
||||
for (w of float32x4val) {
|
||||
testEqualFloat32x4(v, w);
|
||||
testNotEqualFloat32x4(v, w);
|
||||
testLessThanFloat32x4(v, w);
|
||||
testLessThanOrEqualFloat32x4(v, w);
|
||||
testGreaterThanFloat32x4(v, w);
|
||||
testGreaterThanOrEqualFloat32x4(v, w);
|
||||
}
|
||||
}
|
||||
|
||||
var int32x4val = [
|
||||
int32x4(1, 2, 3, 4),
|
||||
int32x4(-1, -2, -3, -4),
|
||||
int32x4(-1, 2, -3, 4),
|
||||
int32x4(1, -2, 3, -4),
|
||||
int32x4(INT32_MAX, INT32_MAX, INT32_MIN, INT32_MIN),
|
||||
int32x4(INT32_MAX, INT32_MIN, INT32_MAX, INT32_MIN)
|
||||
];
|
||||
|
||||
for (v of int32x4val) {
|
||||
for (w of int32x4val) {
|
||||
testEqualInt32x4(v, w);
|
||||
testNotEqualInt32x4(v, w);
|
||||
testLessThanInt32x4(v, w);
|
||||
testLessThanOrEqualInt32x4(v, w);
|
||||
testGreaterThanInt32x4(v, w);
|
||||
testGreaterThanOrEqualInt32x4(v, w);
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
|
@ -1,34 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 946042;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'float32x4 equal';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
// FIXME -- Bug 1081697: Amend to check for correctness of NaN/-0/Infinity/-Infinity border cases.
|
||||
|
||||
var a = float32x4(1, 20, 30, 40);
|
||||
var b = float32x4(10, 20, 30, 4);
|
||||
var c = SIMD.float32x4.equal(a, b);
|
||||
assertEq(c.x, 0);
|
||||
assertEq(c.y, -1);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
var d = float32x4(1.89, 20.51, 30.46, 40.12);
|
||||
var e = float32x4(10.89, 20.51, Math.fround(30.46), 4.12);
|
||||
var f = SIMD.float32x4.equal(d, e);
|
||||
assertEq(c.x, 0);
|
||||
assertEq(c.y, -1);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 946042;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'float32x4 greaterThan';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
// FIXME -- Bug 1081697: Amend to check for correctness of -0/Infinity/-Infinity border cases.
|
||||
// FIXME -- Bug 1068028: Amend to check for correctness of NaN border cases once the semantics are defined.
|
||||
|
||||
var a = float32x4(1, 20, 3, 40);
|
||||
var b = float32x4(10, 2, 30, 4);
|
||||
var c = SIMD.float32x4.greaterThan(b, a);
|
||||
assertEq(c.x, -1);
|
||||
assertEq(c.y, 0);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
var d = float32x4(10.8399, 20.37, 3.07, 4.6802);
|
||||
var e = float32x4(10.8401, 20.367, 3.1, 4.6801);
|
||||
var f = float32x4.greaterThan(e, d);
|
||||
assertEq(f.x, -1);
|
||||
assertEq(f.y, 0);
|
||||
assertEq(f.z, -1);
|
||||
assertEq(f.w, 0);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 946042;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'float32x4 greaterThanOrEqual';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
// FIXME -- Bug 1081697: Amend to check for correctness of -0/Infinity/-Infinity border cases.
|
||||
// FIXME -- Bug 1068028: Amend to check for correctness of NaN border cases once the semantics are defined.
|
||||
|
||||
var a = float32x4(1, 20, 30, 40);
|
||||
var b = float32x4(10, 20, 30, 4);
|
||||
var c = SIMD.float32x4.greaterThanOrEqual(b, a);
|
||||
assertEq(c.x, -1);
|
||||
assertEq(c.y, -1);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
var d = float32x4(10.029, 20.87, 30.56, 4.7);
|
||||
var e = float32x4(10.03, 20.87, 30.56, 4.698);
|
||||
var f = float32x4.greaterThanOrEqual(e, d);
|
||||
assertEq(f.x, -1);
|
||||
assertEq(f.y, -1);
|
||||
assertEq(f.z, -1);
|
||||
assertEq(f.w, 0);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 946042;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'float32x4 lessThan';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
// FIXME -- Bug 1081697: Amend to check for correctness of -0/Infinity/-Infinity border cases.
|
||||
// FIXME -- Bug 1068028: Amend to check for correctness of NaN border cases once the semantics are defined.
|
||||
|
||||
var a = float32x4(1, 20, 3, 40);
|
||||
var b = float32x4(10, 2, 30, 4);
|
||||
var c = SIMD.float32x4.lessThan(a, b);
|
||||
assertEq(c.x, -1);
|
||||
assertEq(c.y, 0);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
var d = float32x4(1.5399, 20.001, 30.045, 4.74);
|
||||
var e = float32x4(1.54, 19.999, 30.05, 4.72);
|
||||
var f = float32x4.lessThan(a, b);
|
||||
assertEq(f.x, -1);
|
||||
assertEq(f.y, 0);
|
||||
assertEq(f.z, -1);
|
||||
assertEq(f.w, 0);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 946042;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'float32x4 lessThanOrEqual';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
// FIXME -- Bug 1081697: Amend to check for correctness of -0/Infinity/-Infinity border cases.
|
||||
// FIXME -- Bug 1068028: Amend to check for correctness of NaN border cases once the semantics are defined.
|
||||
|
||||
var a = float32x4(1, 20, 30, 40);
|
||||
var b = float32x4(10, 20, 30, 4);
|
||||
var c = SIMD.float32x4.lessThanOrEqual(a, b);
|
||||
assertEq(c.x, -1);
|
||||
assertEq(c.y, -1);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
var d = float32x4(9.999, 20.78, 30.14, 40.1235);
|
||||
var e = float32x4(10, 20.78, 30.14, 40.123);
|
||||
var f = float32x4.lessThanOrEqual(d, e);
|
||||
assertEq(f.x, -1);
|
||||
assertEq(f.y, -1);
|
||||
assertEq(f.z, -1);
|
||||
assertEq(f.w, 0);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 946042;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'float32x4 notEqual';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
// FIXME -- Bug 1081697: Amend to check for correctness of NaN/-0/Infinity/-Infinity border cases.
|
||||
|
||||
var a = float32x4(1, 20, 30, 40);
|
||||
var b = float32x4(10, 20, 30, 4);
|
||||
var c = SIMD.float32x4.notEqual(a, b);
|
||||
assertEq(c.x, -1);
|
||||
assertEq(c.y, 0);
|
||||
assertEq(c.z, 0);
|
||||
assertEq(c.w, -1);
|
||||
|
||||
var d = float32x4(9.98, 20.65, 30.14, 4.235);
|
||||
var e = float32x4(9.99, 20.65, Math.fround(30.14), 4.23);
|
||||
var f = SIMD.float32x4.notEqual(d, e);
|
||||
assertEq(f.x, -1);
|
||||
assertEq(f.y, 0);
|
||||
assertEq(f.z, 0);
|
||||
assertEq(f.w, -1);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 946042;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'float32x4 scale';
|
||||
|
||||
function mulf(a, b) {
|
||||
return Math.fround(Math.fround(a) * Math.fround(b));
|
||||
}
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var a = float32x4(1, 2, 3, 4);
|
||||
var c = SIMD.float32x4.scale(a, 2);
|
||||
assertEq(c.x, 2);
|
||||
assertEq(c.y, 4);
|
||||
assertEq(c.z, 6);
|
||||
assertEq(c.w, 8);
|
||||
|
||||
var d = float32x4(1.34, 2.76, 3.21, 4.09);
|
||||
var f = float32x4.scale(d, 2.54);
|
||||
assertEq(f.x, mulf(1.34, 2.54));
|
||||
assertEq(f.y, mulf(2.76, 2.54));
|
||||
assertEq(f.z, mulf(3.21, 2.54));
|
||||
assertEq(f.w, mulf(4.09, 2.54));
|
||||
|
||||
var g = float32x4(NaN, -0, Infinity, -Infinity);
|
||||
var i = float32x4.scale(g, 2.54);
|
||||
assertEq(i.x, NaN);
|
||||
assertEq(i.y, -0);
|
||||
assertEq(i.z, Infinity);
|
||||
assertEq(i.w, -Infinity);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 996076;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'int32x4 equal';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var a = int32x4(1, 20, 30, 40);
|
||||
var b = int32x4(10, 20, 30, 4);
|
||||
var c = SIMD.int32x4.equal(a, b);
|
||||
assertEq(c.x, 0);
|
||||
assertEq(c.y, -1);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 996076;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'int32x4 greaterThan';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var a = int32x4(1, 20, 3, 40);
|
||||
var b = int32x4(10, 2, 30, 4);
|
||||
var c = SIMD.int32x4.greaterThan(b,a);
|
||||
assertEq(c.x, -1);
|
||||
assertEq(c.y, 0);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 996076;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'int32x4 lessThan';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var a = int32x4(1, 20, 3, 40);
|
||||
var b = int32x4(10, 2, 30, 4);
|
||||
var c = SIMD.int32x4.lessThan(a, b);
|
||||
assertEq(c.x, -1);
|
||||
assertEq(c.y, 0);
|
||||
assertEq(c.z, -1);
|
||||
assertEq(c.w, 0);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
// |reftest| skip-if(!this.hasOwnProperty("SIMD"))
|
||||
var BUGNUMBER = 946042;
|
||||
var float32x4 = SIMD.float32x4;
|
||||
var int32x4 = SIMD.int32x4;
|
||||
|
||||
var summary = 'int32x4 with';
|
||||
|
||||
function test() {
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
var a = int32x4(1, 2, 3, 4);
|
||||
var x = SIMD.int32x4.withFlagX(a, true);
|
||||
var y = SIMD.int32x4.withFlagY(a, false);
|
||||
var z = SIMD.int32x4.withFlagZ(a, false);
|
||||
var w = SIMD.int32x4.withFlagW(a, true);
|
||||
assertEq(x.x, -1);
|
||||
assertEq(y.y, 0);
|
||||
assertEq(z.z, 0);
|
||||
assertEq(w.w, -1);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(true, true);
|
||||
}
|
||||
|
||||
test();
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-print"><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Testcase for bug 1102791</title>
|
||||
<style type="text/css">
|
||||
|
||||
html,body {
|
||||
color:black; background-color:white; font-size:16px; padding:0; margin:0;
|
||||
}
|
||||
|
||||
button {
|
||||
position: absolute;
|
||||
-moz-appearance: none;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
border-style:none;
|
||||
}
|
||||
button::before {
|
||||
position: absolute;
|
||||
content: "::before";
|
||||
width: 10px;
|
||||
height: 200em;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<button></button>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -59,3 +59,4 @@ load 944198.html
|
|||
load 949891.xhtml
|
||||
load 959311.html
|
||||
load 960277-2.html
|
||||
load 1102791.html
|
||||
|
|
|
@ -203,6 +203,11 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext,
|
|||
FinishReflowWithAbsoluteFrames(aPresContext, aDesiredSize,
|
||||
aReflowState, aStatus);
|
||||
|
||||
// We're always complete and we don't support overflow containers
|
||||
// so we shouldn't have a next-in-flow ever.
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
MOZ_ASSERT(!GetNextInFlow());
|
||||
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,8 @@ nsAbsoluteContainingBlock::Reflow(nsContainerFrame* aDelegatingFrame,
|
|||
aConstrainHeight, kidFrame, kidStatus,
|
||||
aOverflowAreas);
|
||||
nsIFrame* nextFrame = kidFrame->GetNextInFlow();
|
||||
if (!NS_FRAME_IS_FULLY_COMPLETE(kidStatus)) {
|
||||
if (!NS_FRAME_IS_FULLY_COMPLETE(kidStatus) &&
|
||||
aDelegatingFrame->IsFrameOfType(nsIFrame::eCanContainOverflowContainers)) {
|
||||
// Need a continuation
|
||||
if (!nextFrame) {
|
||||
nextFrame =
|
||||
|
|
|
@ -84,6 +84,44 @@ IsWindowsBuildOrLater(uint32_t aBuild)
|
|||
return false;
|
||||
}
|
||||
|
||||
#if defined(_M_X64) || defined(_M_AMD64)
|
||||
// We support only Win7 or later on Win64.
|
||||
MOZ_ALWAYS_INLINE bool
|
||||
IsXPSP3OrLater()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE bool
|
||||
IsWin2003OrLater()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE bool
|
||||
IsWin2003SP2OrLater()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE bool
|
||||
IsVistaOrLater()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE bool
|
||||
IsVistaSP1OrLater()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE bool
|
||||
IsWin7OrLater()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
MOZ_ALWAYS_INLINE bool
|
||||
IsXPSP3OrLater()
|
||||
{
|
||||
|
@ -119,6 +157,7 @@ IsWin7OrLater()
|
|||
{
|
||||
return IsWindowsVersionOrLater(0x06010000ul);
|
||||
}
|
||||
#endif
|
||||
|
||||
MOZ_ALWAYS_INLINE bool
|
||||
IsWin7SP1OrLater()
|
||||
|
|
|
@ -121,6 +121,7 @@
|
|||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "PSMRunnable.h"
|
||||
#include "RootCertificateTelemetryUtils.h"
|
||||
#include "SharedSSLState.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsURLHelper.h"
|
||||
|
@ -959,6 +960,34 @@ GatherBaselineRequirementsTelemetry(const ScopedCERTCertList& certList)
|
|||
commonNameInSubjectAltNames);
|
||||
}
|
||||
|
||||
// Gathers telemetry on which CA is the root of a given cert chain.
|
||||
// If the root is a built-in root, then the telemetry makes a count
|
||||
// by root. Roots that are not built-in are counted in one bin.
|
||||
void
|
||||
GatherRootCATelemetry(const ScopedCERTCertList& certList)
|
||||
{
|
||||
CERTCertListNode* rootNode = CERT_LIST_TAIL(certList);
|
||||
PR_ASSERT(rootNode);
|
||||
if (!rootNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only log telemetry if the certificate list is non-empty
|
||||
if (!CERT_LIST_END(rootNode, certList)) {
|
||||
AccumulateTelemetryForRootCA(Telemetry::CERT_VALIDATION_SUCCESS_BY_CA,
|
||||
rootNode->cert);
|
||||
}
|
||||
}
|
||||
|
||||
// There are various things that we want to measure about certificate
|
||||
// chains that we accept. This is a single entry point for all of them.
|
||||
void
|
||||
GatherSuccessfulValidationTelemetry(const ScopedCERTCertList& certList)
|
||||
{
|
||||
GatherBaselineRequirementsTelemetry(certList);
|
||||
GatherRootCATelemetry(certList);
|
||||
}
|
||||
|
||||
SECStatus
|
||||
AuthCertificate(CertVerifier& certVerifier,
|
||||
TransportSecurityInfo* infoObject,
|
||||
|
@ -1003,7 +1032,8 @@ AuthCertificate(CertVerifier& certVerifier,
|
|||
}
|
||||
|
||||
if (rv == SECSuccess) {
|
||||
GatherBaselineRequirementsTelemetry(certList);
|
||||
GatherSuccessfulValidationTelemetry(certList);
|
||||
|
||||
// The connection may get terminated, for example, if the server requires
|
||||
// a client cert. Let's provide a minimal SSLStatus
|
||||
// to the caller that contains at least the cert and its status.
|
||||
|
|
|
@ -77,6 +77,10 @@ SOURCES += [
|
|||
'PSMContentListener.cpp',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/security/manager/boot/src',
|
||||
]
|
||||
|
||||
if not CONFIG['MOZ_NO_SMART_CARDS']:
|
||||
UNIFIED_SOURCES += [
|
||||
'nsSmartCardMonitor.cpp',
|
||||
|
|
|
@ -31,6 +31,7 @@ class ErrorCodes(object):
|
|||
INVALID_RESPONSE = 53
|
||||
FRAME_SEND_NOT_INITIALIZED_ERROR = 54
|
||||
FRAME_SEND_FAILURE_ERROR = 55
|
||||
FRAME_NOT_RESPONDING = 56
|
||||
UNSUPPORTED_OPERATION = 405
|
||||
MARIONETTE_ERROR = 500
|
||||
|
||||
|
|
|
@ -1584,3 +1584,13 @@ class Marionette(object):
|
|||
"""
|
||||
|
||||
return self._send_message("maximizeWindow", "ok")
|
||||
|
||||
def set_frame_timeout(self, timeout):
|
||||
""" Set the OOP frame timeout value in ms. When focus is on a
|
||||
remote frame, if the heartbeat pong is not received within this
|
||||
specified value, the frame will timeout.
|
||||
|
||||
:param timeout: The frame timeout value in ms.
|
||||
"""
|
||||
|
||||
return self._send_message("setFrameTimeout", "ok", ms=timeout)
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from errors import MarionetteException
|
||||
from marionette_test import MarionetteTestCase
|
||||
|
||||
class TestSetFrameTimeout(MarionetteTestCase):
|
||||
|
||||
def test_set_valid_frame_timeout(self):
|
||||
self.marionette.set_frame_timeout(10000)
|
||||
|
||||
def test_set_invalid_frame_timeout(self):
|
||||
with self.assertRaisesRegexp(MarionetteException, "Not a number"):
|
||||
self.marionette.set_frame_timeout("timeout")
|
|
@ -133,4 +133,5 @@ b2g = false
|
|||
[test_set_window_size.py]
|
||||
b2g = false
|
||||
skip-if = os == "linux" # Bug 1085717
|
||||
[test_set_frame_timeout.py]
|
||||
[test_with_using_context.py]
|
||||
|
|
|
@ -108,6 +108,16 @@ FrameManager.prototype = {
|
|||
let oopFrame = frameWindow.document.getElementsByTagName("iframe")[message.json.frame]; //find the OOP frame
|
||||
let mm = oopFrame.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader.messageManager; //get the OOP frame's mm
|
||||
|
||||
// Grab the app name
|
||||
let appName = null;
|
||||
try {
|
||||
appName = oopFrame.getAttribute("mozapp");
|
||||
}
|
||||
catch(e) {
|
||||
appName = "mozapp name unavailable";
|
||||
logger.info("Error getting mozapp: " + e.result)
|
||||
}
|
||||
|
||||
// See if this frame already has our frame script loaded in it; if so,
|
||||
// just wake it up.
|
||||
for (let i = 0; i < remoteFrames.length; i++) {
|
||||
|
@ -133,7 +143,7 @@ FrameManager.prototype = {
|
|||
}
|
||||
|
||||
mm.sendAsyncMessage("Marionette:restart", {});
|
||||
return oopFrame.id;
|
||||
return [oopFrame.id, appName];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,7 +160,7 @@ FrameManager.prototype = {
|
|||
|
||||
aFrame.specialPowersObserver = new specialpowers.SpecialPowersObserver();
|
||||
aFrame.specialPowersObserver.init(mm);
|
||||
return oopFrame.id;
|
||||
return [oopFrame.id, appName];
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -166,6 +176,22 @@ FrameManager.prototype = {
|
|||
this.handledModal = false;
|
||||
},
|
||||
|
||||
/*
|
||||
* Remove specified frame from the remote frames list
|
||||
*/
|
||||
removeRemoteFrame: function FM_removeRemoteFrame(frameId) {
|
||||
logger.info("Deleting frame from remote frames list: " + frameId);
|
||||
startLen = remoteFrames.length;
|
||||
for (let i = 0; i < remoteFrames.length; i++) {
|
||||
if (remoteFrames[i].frameId == frameId) {
|
||||
remoteFrames.splice(i, 1);
|
||||
}
|
||||
}
|
||||
if (remoteFrames.length == startLen) {
|
||||
logger.info("Frame not found in remote frames list");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* This function removes any SpecialPowersObservers from OOP frames.
|
||||
*/
|
||||
|
@ -205,9 +231,11 @@ FrameManager.prototype = {
|
|||
messageManager.addWeakMessageListener("Marionette:addCookie", this.server);
|
||||
messageManager.addWeakMessageListener("Marionette:getVisibleCookies", this.server);
|
||||
messageManager.addWeakMessageListener("Marionette:deleteCookie", this.server);
|
||||
messageManager.addWeakMessageListener("Marionette:pong", this.server);
|
||||
messageManager.addWeakMessageListener("MarionetteFrame:handleModal", this);
|
||||
messageManager.addWeakMessageListener("MarionetteFrame:getCurrentFrameId", this);
|
||||
messageManager.addWeakMessageListener("MarionetteFrame:getInterruptedState", this);
|
||||
messageManager.addWeakMessageListener("Marionette:startHeartbeat", this.server);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -236,8 +264,10 @@ FrameManager.prototype = {
|
|||
messageManager.removeWeakMessageListener("Marionette:addCookie", this.server);
|
||||
messageManager.removeWeakMessageListener("Marionette:getVisibleCookies", this.server);
|
||||
messageManager.removeWeakMessageListener("Marionette:deleteCookie", this.server);
|
||||
messageManager.removeWeakMessageListener("Marionette:pong", this.server);
|
||||
messageManager.removeWeakMessageListener("MarionetteFrame:handleModal", this);
|
||||
messageManager.removeWeakMessageListener("MarionetteFrame:getCurrentFrameId", this);
|
||||
messageManager.removeWeakMessageListener("Marionette:startHeartbeat", this.server);
|
||||
},
|
||||
|
||||
};
|
||||
|
|
|
@ -188,6 +188,7 @@ function startListeners() {
|
|||
addMessageListenerId("Marionette:getCookies", getCookies);
|
||||
addMessageListenerId("Marionette:deleteAllCookies", deleteAllCookies);
|
||||
addMessageListenerId("Marionette:deleteCookie", deleteCookie);
|
||||
addMessageListenerId("Marionette:ping", ping);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -290,6 +291,7 @@ function deleteSession(msg) {
|
|||
removeMessageListenerId("Marionette:getCookies", getCookies);
|
||||
removeMessageListenerId("Marionette:deleteAllCookies", deleteAllCookies);
|
||||
removeMessageListenerId("Marionette:deleteCookie", deleteCookie);
|
||||
removeMessageListenerId("Marionette:ping", ping);
|
||||
if (isB2G) {
|
||||
content.removeEventListener("mozbrowsershowmodalprompt", modalHandler, false);
|
||||
}
|
||||
|
@ -1287,6 +1289,8 @@ function get(msg) {
|
|||
if (curFrame.document.readyState == "complete") {
|
||||
removeEventListener("DOMContentLoaded", onDOMContentLoaded, false);
|
||||
sendOk(command_id);
|
||||
// Restart the OOP frame heartbeat now that the URL is loaded
|
||||
sendToServer("Marionette:startHeartbeat");
|
||||
}
|
||||
else if (curFrame.document.readyState == "interactive" &&
|
||||
errorRegex.exec(curFrame.document.baseURI)) {
|
||||
|
@ -1918,6 +1922,13 @@ function getAppCacheStatus(msg) {
|
|||
msg.json.command_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Received heartbeat ping
|
||||
*/
|
||||
function ping(msg) {
|
||||
sendToServer("Marionette:pong", {}, msg.json.command_id);
|
||||
}
|
||||
|
||||
// emulator callbacks
|
||||
let _emu_cb_id = 0;
|
||||
let _emu_cbs = {};
|
||||
|
|
|
@ -98,18 +98,14 @@ function FrameSendNotInitializedError(frame) {
|
|||
this.code = 54;
|
||||
this.frame = frame;
|
||||
this.message = "Error sending message to frame (NS_ERROR_NOT_INITIALIZED)";
|
||||
this.toString = function() {
|
||||
return this.message + " " + this.frame + "; frame has closed.";
|
||||
}
|
||||
this.errMsg = this.message + " " + this.frame + "; frame has closed.";
|
||||
}
|
||||
|
||||
function FrameSendFailureError(frame) {
|
||||
this.code = 55;
|
||||
this.frame = frame;
|
||||
this.message = "Error sending message to frame (NS_ERROR_FAILURE)";
|
||||
this.toString = function() {
|
||||
return this.message + " " + this.frame + "; frame not responding.";
|
||||
}
|
||||
this.errMsg = this.message + " " + this.frame + "; frame not responding.";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -155,6 +151,11 @@ function MarionetteServerConnection(aPrefix, aTransport, aServer)
|
|||
this.currentFrameElement = null;
|
||||
this.testName = null;
|
||||
this.mozBrowserClose = null;
|
||||
this.frameHeartbeatTimer = null;
|
||||
this.frameHeartbeatLastPong = null;
|
||||
this.frameHeartbeatLastApp = null;
|
||||
this.frameHeartbeatExceptionPending = false;
|
||||
this.frameTimeout = 5000; // default, set with setFrameTimeout
|
||||
this.oopFrameId = null; // frame ID of current remote frame, used for mozbrowserclose events
|
||||
this.sessionCapabilities = {
|
||||
// Mandated capabilities
|
||||
|
@ -243,11 +244,21 @@ MarionetteServerConnection.prototype = {
|
|||
* @param object values
|
||||
* Object to send to the listener
|
||||
*/
|
||||
sendAsync: function MDA_sendAsync(name, values, commandId, ignoreFailure) {
|
||||
sendAsync: function MDA_sendAsync(name, values, commandId, ignoreFailure, throwError) {
|
||||
let success = true;
|
||||
if (commandId) {
|
||||
values.command_id = commandId;
|
||||
}
|
||||
if (typeof(throwError) !== "boolean") {
|
||||
throwError = false;
|
||||
}
|
||||
if (this.frameHeartbeatExceptionPending) {
|
||||
// Previous frame was not responding; send exception indicating have switched to system frame
|
||||
this.frameHeartbeatExceptionPending = false;
|
||||
let errorTxt = "Frame not responding (" + this.frameHeartbeatLastApp + "), switching to root frame";
|
||||
this.sendError(errorTxt, 56, null, this.command_id);
|
||||
return false;
|
||||
}
|
||||
if (this.curBrowser.frameManager.currentRemoteFrame !== null) {
|
||||
try {
|
||||
this.messageManager.sendAsyncMessage(
|
||||
|
@ -268,7 +279,12 @@ MarionetteServerConnection.prototype = {
|
|||
break;
|
||||
}
|
||||
let code = error.hasOwnProperty('code') ? e.code : 500;
|
||||
this.sendError(error.toString(), code, error.stack, commandId);
|
||||
if (throwError == false) {
|
||||
this.sendError(error.toString(), code, error.stack, commandId);
|
||||
}
|
||||
else {
|
||||
throw {message:"sendAsync failed: " + error.hasOwnProperty('type'), code, stack:null};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -724,6 +740,10 @@ MarionetteServerConnection.prototype = {
|
|||
else {
|
||||
this.context = context;
|
||||
this.sendOk(this.command_id);
|
||||
// Stop the OOP frame heartbeat if switched into chrome
|
||||
if (context == "chrome") {
|
||||
this.stopHeartbeat();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1179,6 +1199,8 @@ MarionetteServerConnection.prototype = {
|
|||
if (this.context != "chrome") {
|
||||
aRequest.command_id = command_id;
|
||||
aRequest.parameters.pageTimeout = this.pageTimeout;
|
||||
// stop OOP frame heartbeat if it's running, so it won't timeout during URL load
|
||||
this.stopHeartbeat();
|
||||
this.sendAsync("get", aRequest.parameters, command_id);
|
||||
return;
|
||||
}
|
||||
|
@ -1471,7 +1493,6 @@ MarionetteServerConnection.prototype = {
|
|||
this.sendError("Error loading page", 13, null, command_id);
|
||||
return;
|
||||
}
|
||||
|
||||
checkTimer.initWithCallback(checkLoad.bind(this), 100, Ci.nsITimer.TYPE_ONE_SHOT);
|
||||
}
|
||||
if (this.context == "chrome") {
|
||||
|
@ -2327,6 +2348,7 @@ MarionetteServerConnection.prototype = {
|
|||
*/
|
||||
deleteSession: function MDA_deleteSession() {
|
||||
let command_id = this.command_id = this.getCommandId();
|
||||
this.stopHeartbeat();
|
||||
try {
|
||||
this.sessionTearDown();
|
||||
}
|
||||
|
@ -2641,6 +2663,22 @@ MarionetteServerConnection.prototype = {
|
|||
this.sendOk(this.command_id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the OOP frame timeout value (ms)
|
||||
*/
|
||||
setFrameTimeout: function MDA_setFrameTimeout(aRequest) {
|
||||
this.command_id = this.getCommandId();
|
||||
let timeout = parseInt(aRequest.parameters.ms);
|
||||
if (isNaN(timeout)) {
|
||||
this.sendError("Not a number", 500, null, this.command_id);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
this.frameTimeout = timeout;
|
||||
}
|
||||
this.sendOk(this.command_id);
|
||||
},
|
||||
|
||||
/**
|
||||
* Helper function to convert an outerWindowID into a UID that Marionette
|
||||
* tracks.
|
||||
|
@ -2650,6 +2688,54 @@ MarionetteServerConnection.prototype = {
|
|||
return uid;
|
||||
},
|
||||
|
||||
/**
|
||||
* Start the OOP frame heartbeat
|
||||
*/
|
||||
startHeartbeat: function MDA_startHeartbeat() {
|
||||
this.frameHeartbeatLastPong = new Date().getTime();
|
||||
function pulse() {
|
||||
let noResponse = false;
|
||||
let now = new Date().getTime();
|
||||
let elapsed = now - this.frameHeartbeatLastPong;
|
||||
try {
|
||||
if (elapsed > this.frameTimeout) {
|
||||
throw {message:null, code:56, stack:null};
|
||||
}
|
||||
let result = this.sendAsync("ping", {}, this.command_id, false, true);
|
||||
if (result == false) {
|
||||
throw {message:null, code:56, stack:null};
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
let lastApp = this.frameHeartbeatLastApp ? this.frameHeartbeatLastApp : "undefined";
|
||||
this.stopHeartbeat();
|
||||
this.curBrowser.frameManager.removeRemoteFrame(this.curBrowser.frameManager.currentRemoteFrame.frameId);
|
||||
this.switchToGlobalMessageManager();
|
||||
// If there is an active request, send back an exception now, otherwise wait until next request
|
||||
if (this.command_id) {
|
||||
let errorTxt = "Frame not responding (" + lastApp + "), switching to root frame";
|
||||
this.sendError(errorTxt, e.code, e.stack, this.command_id);
|
||||
}
|
||||
else {
|
||||
this.frameHeartbeatExceptionPending = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.frameHeartbeatTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
||||
this.frameHeartbeatTimer.initWithCallback(pulse.bind(this), 500, Ci.nsITimer.TYPE_REPEATING_PRECISE_CAN_SKIP);
|
||||
},
|
||||
|
||||
/**
|
||||
* Stop the OOP frame heartbeat
|
||||
*/
|
||||
stopHeartbeat: function MDA_stopHeartbeat() {
|
||||
if (this.frameHeartbeatTimer !== null) {
|
||||
this.frameHeartbeatTimer.cancel();
|
||||
this.frameHeartbeatTimer = null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Receives all messages from content messageManager
|
||||
*/
|
||||
|
@ -2686,7 +2772,7 @@ MarionetteServerConnection.prototype = {
|
|||
this.sendToClient(message.json, -1);
|
||||
break;
|
||||
case "Marionette:switchToFrame":
|
||||
this.oopFrameId = this.curBrowser.frameManager.switchToFrame(message);
|
||||
[this.oopFrameId, this.frameHeartbeatLastApp] = this.curBrowser.frameManager.switchToFrame(message);
|
||||
this.messageManager = this.curBrowser.frameManager.currentRemoteFrame.messageManager.get();
|
||||
break;
|
||||
case "Marionette:switchToModalOrigin":
|
||||
|
@ -2707,6 +2793,7 @@ MarionetteServerConnection.prototype = {
|
|||
}
|
||||
this.currentFrameElement = message.json.frameValue;
|
||||
}
|
||||
this.stopHeartbeat();
|
||||
break;
|
||||
case "Marionette:getVisibleCookies":
|
||||
let [currentPath, host] = message.json.value;
|
||||
|
@ -2770,6 +2857,7 @@ MarionetteServerConnection.prototype = {
|
|||
// is from a remote frame.
|
||||
this.curBrowser.frameManager.currentRemoteFrame.targetFrameId = this.generateFrameId(message.json.value);
|
||||
this.sendOk(this.command_id);
|
||||
this.startHeartbeat();
|
||||
}
|
||||
|
||||
let browserType;
|
||||
|
@ -2820,6 +2908,12 @@ MarionetteServerConnection.prototype = {
|
|||
globalMessageManager.broadcastAsyncMessage(
|
||||
"MarionetteMainListener:emitTouchEvent", message.json);
|
||||
return;
|
||||
case "Marionette:pong":
|
||||
this.frameHeartbeatLastPong = new Date().getTime();
|
||||
break;
|
||||
case "Marionette:startHeartbeat":
|
||||
this.startHeartbeat();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2903,7 +2997,8 @@ MarionetteServerConnection.prototype.requestTypes = {
|
|||
"setScreenOrientation": MarionetteServerConnection.prototype.setScreenOrientation,
|
||||
"getWindowSize": MarionetteServerConnection.prototype.getWindowSize,
|
||||
"setWindowSize": MarionetteServerConnection.prototype.setWindowSize,
|
||||
"maximizeWindow": MarionetteServerConnection.prototype.maximizeWindow
|
||||
"maximizeWindow": MarionetteServerConnection.prototype.maximizeWindow,
|
||||
"setFrameTimeout": MarionetteServerConnection.prototype.setFrameTimeout
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
PACKAGE_NAME = 'mozlog'
|
||||
PACKAGE_VERSION = '2.7'
|
||||
PACKAGE_VERSION = '2.8'
|
||||
|
||||
setup(name=PACKAGE_NAME,
|
||||
version=PACKAGE_VERSION,
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче