зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to fx-team.
This commit is contained in:
Коммит
7d94b98700
|
@ -19,13 +19,13 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9100fa82fc355f5201e23e400fc6b40e875304ed"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -128,7 +128,7 @@
|
|||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
|
||||
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="c3ee0c875393607430086f942950d1b3f496ab0e"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c229a9415c8d46924b5f70e06161d7ca22b6242f"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="0a2b7e94dce4989a3740fea6f6e3152978216c88"/>
|
||||
<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="dd94b2e17a146cb782d71933d25dcaa9c060e6ce"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="d0aa65b140a45016975ed0ecf35f280dd336e1d3"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="librecovery" patch="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9100fa82fc355f5201e23e400fc6b40e875304ed"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "6c7d7c523464de80214c548afb7da9b39fde9a4d",
|
||||
"revision": "46fb0be835267316bda52a12dedab53978456833",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<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="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b5811c99126c0dcbd5e52df582d7263520c12939"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b5811c99126c0dcbd5e52df582d7263520c12939"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</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="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="b5811c99126c0dcbd5e52df582d7263520c12939"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d904b0a8b6992c0041dcc9480a116d291fe8d3b2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e98fe1e94d3d80ad36903500d8ca3333904b162c"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<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="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="c5e563ed4ea69e3737bbbe6156f2915dd1e86226"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="41e7db9834c5ed99ed448074dce2b7331cf19c9f"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
|
|
@ -74,6 +74,13 @@ ifdef MOZ_JEMALLOC3
|
|||
DEFINES += -DMOZ_JEMALLOC3
|
||||
endif
|
||||
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
DEFINES += -DMOZ_GTK=1
|
||||
ifdef MOZ_ENABLE_GTK3
|
||||
DEFINES += -DMOZ_GTK3=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE
|
||||
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
|
||||
|
|
|
@ -96,6 +96,10 @@
|
|||
@BINPATH@/res/drawable-hdpi
|
||||
@BINPATH@/res/layout
|
||||
#endif
|
||||
#ifdef MOZ_GTK3
|
||||
@BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozgtk2@DLL_SUFFIX@
|
||||
#endif
|
||||
|
||||
[browser]
|
||||
; [Base Browser Files]
|
||||
|
@ -217,7 +221,7 @@
|
|||
@BINPATH@/components/exthelper.xpt
|
||||
@BINPATH@/components/fastfind.xpt
|
||||
@BINPATH@/components/feeds.xpt
|
||||
#ifdef MOZ_GTK2
|
||||
#ifdef MOZ_GTK
|
||||
@BINPATH@/components/filepicker.xpt
|
||||
#endif
|
||||
@BINPATH@/components/find.xpt
|
||||
|
|
|
@ -38,6 +38,9 @@ endif
|
|||
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
DEFINES += -DMOZ_GTK=1
|
||||
ifdef MOZ_ENABLE_GTK3
|
||||
DEFINES += -DMOZ_GTK3=1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef MOZ_NATIVE_NSPR
|
||||
|
|
|
@ -118,6 +118,10 @@
|
|||
@BINPATH@/@DLL_PREFIX@replace_jemalloc@DLL_SUFFIX@
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MOZ_GTK3
|
||||
@BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozgtk2@DLL_SUFFIX@
|
||||
#endif
|
||||
|
||||
[browser]
|
||||
; [Base Browser Files]
|
||||
|
|
|
@ -4377,7 +4377,7 @@ if test "$COMPILE_ENVIRONMENT"; then
|
|||
if test "$MOZ_ENABLE_GTK3"; then
|
||||
PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES)
|
||||
fi
|
||||
if test "$MOZ_ENABLE_GTK2"; then
|
||||
if test "$MOZ_ENABLE_GTK"; then
|
||||
if test "$MOZ_X11"; then
|
||||
GDK_PACKAGES=gdk-x11-2.0
|
||||
fi
|
||||
|
@ -8862,7 +8862,6 @@ AC_SUBST(CC_VERSION)
|
|||
AC_SUBST(CXX_VERSION)
|
||||
AC_SUBST(MSMANIFEST_TOOL)
|
||||
AC_SUBST(NS_ENABLE_TSF)
|
||||
AC_SUBST(MOZ_NSS_PATCH)
|
||||
AC_SUBST(MOZ_APP_COMPONENT_LIBS)
|
||||
AC_SUBST(MOZ_APP_EXTRA_LIBS)
|
||||
|
||||
|
|
|
@ -0,0 +1,228 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 "gtest/gtest.h"
|
||||
#include "VorbisTrackEncoder.h"
|
||||
#include "VP8TrackEncoder.h"
|
||||
#include "WebMWriter.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
class WebMVorbisTrackEncoder : public VorbisTrackEncoder
|
||||
{
|
||||
public:
|
||||
bool TestVorbisCreation(int aChannels, int aSamplingRate)
|
||||
{
|
||||
if (NS_SUCCEEDED(Init(aChannels, aSamplingRate))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
class WebMVP8TrackEncoder: public VP8TrackEncoder
|
||||
{
|
||||
public:
|
||||
bool TestVP8Creation(int32_t aWidth, int32_t aHeight, int32_t aDisplayWidth,
|
||||
int32_t aDisplayHeight, TrackRate aTrackRate)
|
||||
{
|
||||
if (NS_SUCCEEDED(Init(aWidth, aHeight, aDisplayWidth, aDisplayHeight,
|
||||
aTrackRate))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const uint64_t FIXED_DURATION = 1000000;
|
||||
const uint32_t FIXED_FRAMESIZE = 500;
|
||||
|
||||
class TestWebMWriter: public WebMWriter
|
||||
{
|
||||
public:
|
||||
TestWebMWriter(int aTrackTypes)
|
||||
: WebMWriter(aTrackTypes),
|
||||
mTimestamp(0)
|
||||
{}
|
||||
|
||||
void SetVorbisMetadata(int aChannels, int aSampleRate) {
|
||||
WebMVorbisTrackEncoder vorbisEncoder;
|
||||
EXPECT_TRUE(vorbisEncoder.TestVorbisCreation(aChannels, aSampleRate));
|
||||
nsRefPtr<TrackMetadataBase> vorbisMeta = vorbisEncoder.GetMetadata();
|
||||
SetMetadata(vorbisMeta);
|
||||
}
|
||||
void SetVP8Metadata(int32_t aWidth, int32_t aHeight, int32_t aDisplayWidth,
|
||||
int32_t aDisplayHeight,TrackRate aTrackRate) {
|
||||
WebMVP8TrackEncoder vp8Encoder;
|
||||
EXPECT_TRUE(vp8Encoder.TestVP8Creation(aWidth, aHeight, aDisplayWidth,
|
||||
aDisplayHeight, aTrackRate));
|
||||
nsRefPtr<TrackMetadataBase> vp8Meta = vp8Encoder.GetMetadata();
|
||||
SetMetadata(vp8Meta);
|
||||
}
|
||||
|
||||
// When we append an I-Frame into WebM muxer, the muxer will treat previous
|
||||
// data as "a cluster".
|
||||
// In these test cases, we will call the function many times to enclose the
|
||||
// previous cluster so that we can retrieve data by |GetContainerData|.
|
||||
void AppendDummyFrame(EncodedFrame::FrameType aFrameType,
|
||||
uint64_t aDuration) {
|
||||
EncodedFrameContainer encodedVideoData;
|
||||
nsTArray<uint8_t> frameData;
|
||||
nsRefPtr<EncodedFrame> videoData = new EncodedFrame();
|
||||
// Create dummy frame data.
|
||||
frameData.SetLength(FIXED_FRAMESIZE);
|
||||
videoData->SetFrameType(aFrameType);
|
||||
videoData->SetTimeStamp(mTimestamp);
|
||||
videoData->SetDuration(aDuration);
|
||||
videoData->SwapInFrameData(frameData);
|
||||
encodedVideoData.AppendEncodedFrame(videoData);
|
||||
WriteEncodedTrack(encodedVideoData, 0);
|
||||
mTimestamp += aDuration;
|
||||
}
|
||||
|
||||
bool HaveValidCluster() {
|
||||
nsTArray<nsTArray<uint8_t> > encodedBuf;
|
||||
GetContainerData(&encodedBuf, 0);
|
||||
return (encodedBuf.Length() > 0) ? true : false;
|
||||
}
|
||||
|
||||
// Timestamp accumulator that increased by AppendDummyFrame.
|
||||
// Keep it public that we can do some testcases about it.
|
||||
uint64_t mTimestamp;
|
||||
};
|
||||
|
||||
TEST(WebMWriter, Metadata)
|
||||
{
|
||||
TestWebMWriter writer(ContainerWriter::CREATE_AUDIO_TRACK |
|
||||
ContainerWriter::CREATE_VIDEO_TRACK);
|
||||
|
||||
// The output should be empty since we didn't set any metadata in writer.
|
||||
nsTArray<nsTArray<uint8_t> > encodedBuf;
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::GET_HEADER);
|
||||
EXPECT_TRUE(encodedBuf.Length() == 0);
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::FLUSH_NEEDED);
|
||||
EXPECT_TRUE(encodedBuf.Length() == 0);
|
||||
|
||||
// Set vorbis metadata.
|
||||
int channel = 1;
|
||||
int sampleRate = 44100;
|
||||
writer.SetVorbisMetadata(channel, sampleRate);
|
||||
|
||||
// No output data since we didn't set both audio/video
|
||||
// metadata in writer.
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::GET_HEADER);
|
||||
EXPECT_TRUE(encodedBuf.Length() == 0);
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::FLUSH_NEEDED);
|
||||
EXPECT_TRUE(encodedBuf.Length() == 0);
|
||||
|
||||
// Set vp8 metadata
|
||||
int32_t width = 640;
|
||||
int32_t height = 480;
|
||||
int32_t displayWidth = 640;
|
||||
int32_t displayHeight = 480;
|
||||
TrackRate aTrackRate = 90000;
|
||||
writer.SetVP8Metadata(width, height, displayWidth,
|
||||
displayHeight, aTrackRate);
|
||||
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::GET_HEADER);
|
||||
EXPECT_TRUE(encodedBuf.Length() > 0);
|
||||
}
|
||||
|
||||
TEST(WebMWriter, Cluster)
|
||||
{
|
||||
TestWebMWriter writer(ContainerWriter::CREATE_AUDIO_TRACK |
|
||||
ContainerWriter::CREATE_VIDEO_TRACK);
|
||||
// Set vorbis metadata.
|
||||
int channel = 1;
|
||||
int sampleRate = 48000;
|
||||
writer.SetVorbisMetadata(channel, sampleRate);
|
||||
// Set vp8 metadata
|
||||
int32_t width = 320;
|
||||
int32_t height = 240;
|
||||
int32_t displayWidth = 320;
|
||||
int32_t displayHeight = 240;
|
||||
TrackRate aTrackRate = 90000;
|
||||
writer.SetVP8Metadata(width, height, displayWidth,
|
||||
displayHeight, aTrackRate);
|
||||
|
||||
nsTArray<nsTArray<uint8_t> > encodedBuf;
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::GET_HEADER);
|
||||
EXPECT_TRUE(encodedBuf.Length() > 0);
|
||||
encodedBuf.Clear();
|
||||
|
||||
uint64_t timestamp = 0;
|
||||
// write the first I-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// No data because the cluster is not closed.
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
// The second I-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// Should have data because the first cluster is closed.
|
||||
EXPECT_TRUE(writer.HaveValidCluster());
|
||||
|
||||
// P-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_P_FRAME, FIXED_DURATION);
|
||||
// No data because the cluster is not closed.
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
// The third I-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// Should have data because the second cluster is closed.
|
||||
EXPECT_TRUE(writer.HaveValidCluster());
|
||||
}
|
||||
|
||||
TEST(WebMWriter, FLUSH_NEEDED)
|
||||
{
|
||||
TestWebMWriter writer(ContainerWriter::CREATE_AUDIO_TRACK |
|
||||
ContainerWriter::CREATE_VIDEO_TRACK);
|
||||
// Set vorbis metadata.
|
||||
int channel = 2;
|
||||
int sampleRate = 44100;
|
||||
writer.SetVorbisMetadata(channel, sampleRate);
|
||||
// Set vp8 metadata
|
||||
int32_t width = 176;
|
||||
int32_t height = 352;
|
||||
int32_t displayWidth = 176;
|
||||
int32_t displayHeight = 352;
|
||||
TrackRate aTrackRate = 100000;
|
||||
writer.SetVP8Metadata(width, height, displayWidth,
|
||||
displayHeight, aTrackRate);
|
||||
|
||||
uint64_t timestamp = 0;
|
||||
// write the first I-Frame.
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
|
||||
// P-Frame
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_P_FRAME, FIXED_DURATION);
|
||||
// Have data because the metadata is finished.
|
||||
EXPECT_TRUE(writer.HaveValidCluster());
|
||||
// No data because the cluster is not closed and the metatdata had been
|
||||
// retrieved
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
nsTArray<nsTArray<uint8_t> > encodedBuf;
|
||||
// Have data because the flag ContainerWriter::FLUSH_NEEDED
|
||||
writer.GetContainerData(&encodedBuf, ContainerWriter::FLUSH_NEEDED);
|
||||
EXPECT_TRUE(encodedBuf.Length() > 0);
|
||||
encodedBuf.Clear();
|
||||
|
||||
// P-Frame
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_P_FRAME, FIXED_DURATION);
|
||||
// No data because there is no cluster right now. The I-Frame had been
|
||||
// flushed out.
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
// I-Frame
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// No data because a cluster must starts form I-Frame and the
|
||||
// cluster is not closed.
|
||||
EXPECT_FALSE(writer.HaveValidCluster());
|
||||
|
||||
// I-Frame
|
||||
writer.AppendDummyFrame(EncodedFrame::VP8_I_FRAME, FIXED_DURATION);
|
||||
// Have data because the previous cluster is closed.
|
||||
EXPECT_TRUE(writer.HaveValidCluster());
|
||||
}
|
|
@ -14,6 +14,7 @@ UNIFIED_SOURCES += [
|
|||
if CONFIG['MOZ_WEBM_ENCODER']:
|
||||
UNIFIED_SOURCES += ['TestVideoTrackEncoder.cpp',
|
||||
'TestVorbisTrackEncoder.cpp',
|
||||
'TestWebMWriter.cpp',
|
||||
]
|
||||
|
||||
EXPORT_LIBRARY = True
|
||||
|
|
|
@ -1873,11 +1873,11 @@ PeerConnectionWrapper.prototype = {
|
|||
|
||||
if (res.type == "outboundrtp") {
|
||||
ok(res.packetsSent !== undefined, "Rtp packetsSent");
|
||||
// minimum fragment is 8 (from RFC 791)
|
||||
ok(res.bytesSent >= res.packetsSent * 8, "Rtp bytesSent");
|
||||
// We assume minimum payload to be 1 byte (guess from RFC 3550)
|
||||
ok(res.bytesSent >= res.packetsSent, "Rtp bytesSent");
|
||||
} else {
|
||||
ok(res.packetsReceived !== undefined, "Rtp packetsReceived");
|
||||
ok(res.bytesReceived >= res.packetsReceived * 8, "Rtp bytesReceived");
|
||||
ok(res.bytesReceived >= res.packetsReceived, "Rtp bytesReceived");
|
||||
}
|
||||
if (res.remoteId) {
|
||||
var rem = stats[res.remoteId];
|
||||
|
@ -1888,7 +1888,7 @@ PeerConnectionWrapper.prototype = {
|
|||
ok(rem.packetsReceived !== undefined, "Rtcp packetsReceived");
|
||||
ok(rem.packetsReceived <= res.packetsSent, "No more than sent");
|
||||
ok(rem.packetsLost !== undefined, "Rtcp packetsLost");
|
||||
ok(rem.bytesReceived >= rem.packetsReceived * 8, "Rtcp bytesReceived");
|
||||
ok(rem.bytesReceived >= rem.packetsReceived, "Rtcp bytesReceived");
|
||||
ok(rem.bytesReceived <= res.bytesSent, "No more than sent bytes");
|
||||
ok(rem.jitter !== undefined, "Rtcp jitter");
|
||||
ok(rem.mozRtt !== undefined, "Rtcp rtt");
|
||||
|
@ -1898,7 +1898,7 @@ PeerConnectionWrapper.prototype = {
|
|||
ok(rem.type == "outboundrtp", "Rtcp is outbound");
|
||||
ok(rem.packetsSent !== undefined, "Rtcp packetsSent");
|
||||
// We may have received more than outdated Rtcp packetsSent
|
||||
ok(rem.bytesSent >= rem.packetsSent * 8, "Rtcp bytesSent");
|
||||
ok(rem.bytesSent >= rem.packetsSent, "Rtcp bytesSent");
|
||||
}
|
||||
ok(rem.ssrc == res.ssrc, "Remote ssrc match");
|
||||
} else {
|
||||
|
|
|
@ -250,6 +250,11 @@ nsNPAPIPlugin::PluginCrashed(const nsAString& pluginDumpID,
|
|||
bool
|
||||
nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
{
|
||||
#if (MOZ_WIDGET_GTK == 3)
|
||||
// We force OOP on Linux/GTK3 because some plugins use GTK2 and both GTK
|
||||
// libraries can't be loaded in the same process.
|
||||
return true;
|
||||
#else
|
||||
if (PR_GetEnv("MOZ_DISABLE_OOP_PLUGINS")) {
|
||||
return false;
|
||||
}
|
||||
|
@ -376,6 +381,7 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
|||
}
|
||||
|
||||
return oopPluginsEnabled;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline PluginLibrary*
|
||||
|
|
|
@ -719,10 +719,10 @@ void nsPluginHost::OnPluginInstanceDestroyed(nsPluginTag* aPluginTag)
|
|||
// Another reason not to unload immediately is that loading is expensive,
|
||||
// and it is better to leave popular plugins loaded.
|
||||
//
|
||||
// Our default behavior is to try to unload a plugin three minutes after
|
||||
// its last instance is destroyed. This seems like a reasonable compromise
|
||||
// that allows us to reclaim memory while allowing short state retention
|
||||
// and avoid perf hits for loading popular plugins.
|
||||
// Our default behavior is to try to unload a plugin after a pref-controlled
|
||||
// delay once its last instance is destroyed. This seems like a reasonable
|
||||
// compromise that allows us to reclaim memory while allowing short state
|
||||
// retention and avoid perf hits for loading popular plugins.
|
||||
if (!hasInstance) {
|
||||
if (UnloadPluginsASAP()) {
|
||||
aPluginTag->TryUnloadPlugin(false);
|
||||
|
|
|
@ -67,9 +67,8 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
|
|||
#include "nsPluginUtilsOSX.h"
|
||||
#endif
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -17,7 +17,11 @@
|
|||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
#if (GTK_MAJOR_VERSION == 3)
|
||||
#include <gtk/gtkx.h>
|
||||
#else
|
||||
#include "gtk2xtbin.h"
|
||||
#endif
|
||||
#include "mozilla/X11Util.h"
|
||||
|
||||
class nsPluginNativeWindowGtk : public nsPluginNativeWindow {
|
||||
|
|
|
@ -4,7 +4,13 @@
|
|||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifneq ($(MOZ_WIDGET_TOOLKIT),gtk3)
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
else
|
||||
# Force build against gtk+2 for struct offsets and such.
|
||||
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
|
||||
endif
|
||||
|
||||
CXXFLAGS += \
|
||||
$(TK_CFLAGS) \
|
||||
$(MOZ_CAIRO_CFLAGS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -42,14 +42,9 @@ using namespace std;
|
|||
#ifdef MOZ_WIDGET_GTK
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#if (MOZ_WIDGET_GTK == 3)
|
||||
#include <gtk/gtkx.h>
|
||||
#endif
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdk.h>
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#include "gtk2xtbin.h"
|
||||
#endif
|
||||
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
#undef KeyPress
|
||||
|
@ -108,7 +103,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
|
|||
, mAsyncInvalidateTask(0)
|
||||
, mCachedWindowActor(nullptr)
|
||||
, mCachedElementActor(nullptr)
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
, mXEmbed(false)
|
||||
#endif // MOZ_WIDGET_GTK
|
||||
#if defined(OS_WIN)
|
||||
|
@ -152,7 +147,7 @@ PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
|
|||
#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
mWindow.ws_info = &mWsInfo;
|
||||
memset(&mWsInfo, 0, sizeof(mWsInfo));
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
mWsInfo.display = nullptr;
|
||||
mXtClient.top_widget = nullptr;
|
||||
#else
|
||||
|
@ -482,7 +477,7 @@ PluginInstanceChild::NPN_SetValue(NPPVariable aVar, void* aValue)
|
|||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
NPWindowType newWindowType = windowed ? NPWindowTypeWindow : NPWindowTypeDrawable;
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
if (mWindow.type != newWindowType && mWsInfo.display) {
|
||||
// plugin type has been changed but we already have a valid display
|
||||
// so update it for the recent plugin mode
|
||||
|
@ -1026,7 +1021,7 @@ bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow)
|
|||
aWindow.x, aWindow.y,
|
||||
aWindow.width, aWindow.height));
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
if (mXEmbed) {
|
||||
mWindow.window = reinterpret_cast<void*>(aWindow.window);
|
||||
}
|
||||
|
@ -1055,7 +1050,7 @@ void PluginInstanceChild::DeleteWindow()
|
|||
if (!mWindow.window)
|
||||
return;
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
if (mXtClient.top_widget) {
|
||||
xt_client_unrealize(&mXtClient);
|
||||
xt_client_destroy(&mXtClient);
|
||||
|
@ -1103,7 +1098,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
|
|||
CreateWindow(aWindow);
|
||||
}
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
if (mXEmbed && gtk_check_version(2,18,7) != nullptr) { // older
|
||||
if (aWindow.type == NPWindowTypeWindow) {
|
||||
GdkWindow* socket_window = gdk_window_lookup(static_cast<GdkNativeWindow>(aWindow.window));
|
||||
|
@ -1236,7 +1231,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
|
|||
bool
|
||||
PluginInstanceChild::Initialize()
|
||||
{
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
NPError rv;
|
||||
|
||||
if (mWsInfo.display) {
|
||||
|
@ -3990,7 +3985,7 @@ PluginInstanceChild::AnswerNPP_Destroy(NPError* aResult)
|
|||
mAsyncBitmaps.Enumerate(DeleteSurface, this);
|
||||
}
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
if (mWindow.type == NPWindowTypeWindow && !mXEmbed) {
|
||||
xt_client_xloop_destroy();
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <map>
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include "gtk2xtbin.h"
|
||||
#endif
|
||||
|
||||
|
@ -385,7 +385,7 @@ private:
|
|||
|
||||
#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
NPSetWindowCallbackStruct mWsInfo;
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
bool mXEmbed;
|
||||
XtClient mXtClient;
|
||||
#endif
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include <gtk/gtk.h>
|
||||
#if (MOZ_WIDGET_GTK == 3)
|
||||
#include <gtk/gtkx.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "nsIFile.h"
|
||||
|
@ -1096,7 +1093,7 @@ _getvalue(NPP aNPP,
|
|||
*(NPBool*)aValue = value ? true : false;
|
||||
return result;
|
||||
}
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
case NPNVxDisplay: {
|
||||
if (aNPP) {
|
||||
return InstCast(aNPP)->NPN_GetValue(aVariable, aValue);
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "mozilla/ipc/BrowserProcessSubThread.h"
|
||||
#include "mozilla/plugins/PluginMessageUtils.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
|
@ -75,6 +76,7 @@ PluginProcessParent::Launch(int32_t timeoutMs)
|
|||
|
||||
vector<string> args;
|
||||
args.push_back(MungePluginDsoPath(mPluginFilePath));
|
||||
Telemetry::AutoTimer<Telemetry::PLUGIN_STARTUP_MS> timer;
|
||||
return SyncLaunch(args, timeoutMs, selectedArchitecture);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "mozilla/Hal.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "base/message_loop.h"
|
||||
|
||||
#include "BluetoothCommon.h"
|
||||
|
@ -38,6 +40,7 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
using namespace mozilla::dom::gonk;
|
||||
using namespace android;
|
||||
|
@ -496,6 +499,26 @@ AudioManager::~AudioManager() {
|
|||
}
|
||||
}
|
||||
|
||||
static StaticRefPtr<AudioManager> sAudioManager;
|
||||
|
||||
already_AddRefed<AudioManager>
|
||||
AudioManager::GetInstance()
|
||||
{
|
||||
// Avoid createing AudioManager from content process.
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
MOZ_CRASH("Non-chrome processes should not get here.");
|
||||
}
|
||||
|
||||
// Avoid createing multiple AudioManager instance inside main process.
|
||||
if (!sAudioManager) {
|
||||
sAudioManager = new AudioManager();
|
||||
ClearOnShutdown(&sAudioManager);
|
||||
}
|
||||
|
||||
nsRefPtr<AudioManager> audioMgr = sAudioManager.get();
|
||||
return audioMgr.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AudioManager::GetMicrophoneMuted(bool* aMicrophoneMuted)
|
||||
{
|
||||
|
|
|
@ -42,13 +42,12 @@ class AudioManager : public nsIAudioManager
|
|||
, public nsIObserver
|
||||
{
|
||||
public:
|
||||
static already_AddRefed<AudioManager> GetInstance();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIAUDIOMANAGER
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
AudioManager();
|
||||
~AudioManager();
|
||||
|
||||
// When audio backend is dead, recovery task needs to read all volume
|
||||
// settings then set back into audio backend.
|
||||
friend class RecoverTask;
|
||||
|
@ -74,6 +73,9 @@ private:
|
|||
const char* aTopic,
|
||||
const nsCString aAddress);
|
||||
void HandleAudioChannelProcessChanged();
|
||||
|
||||
AudioManager();
|
||||
~AudioManager();
|
||||
};
|
||||
|
||||
} /* namespace gonk */
|
||||
|
|
|
@ -2962,6 +2962,151 @@ this.INFO_REC_EXTENDED_DISPLAY_ORIGINAL_CALLED_NUMBER = 0x99;
|
|||
this.INFO_REC_EXTENDED_DISPLAY_CONNECTED_NUMBER = 0x9A;
|
||||
this.INFO_REC_EXTENDED_DISPLAY_TEXT = 0x9B;
|
||||
|
||||
/**
|
||||
* The table for MCC/MNC which the length of MNC is 3.
|
||||
*
|
||||
* This table is built from below links.
|
||||
* - http://www.itu.int/pub/T-SP-E.212B-2013
|
||||
* - http://en.wikipedia.org/wiki/Mobile_Network_Code
|
||||
*/
|
||||
this.PLMN_HAVING_3DIGITS_MNC = {
|
||||
// Puerto Rico.
|
||||
"330":
|
||||
["110", // América Móvil
|
||||
"120" // PR Wireless
|
||||
],
|
||||
// Trinidad and Tobago.
|
||||
"374":
|
||||
["130", // Digicel Trinidad and Tobago Ltd.
|
||||
"140" // LaqTel Ltd.
|
||||
],
|
||||
// India.
|
||||
"405":
|
||||
["000", // Shyam Telelink Ltd.
|
||||
"005", // Reliance, Delhi
|
||||
"006", // Reliance, Gujarat
|
||||
"007", // Reliance, Haryana
|
||||
"009", // Reliance, J&K
|
||||
"010", // Reliance, Karnataka
|
||||
"011", // Reliance, Kerala
|
||||
"012", // Reliance, Andhra Pradesh
|
||||
"013", // Reliance, Maharashtr
|
||||
"014", // Reliance, Madhya Pradesh
|
||||
"018", // Reliance, Punjab
|
||||
"020", // Reliance, Tamilnadu
|
||||
"021", // Reliance, UP (East)
|
||||
"022", // Reliance, UP (West)
|
||||
"025", // TATA DOCOMO, Andhra Pradesh
|
||||
"026", // TATA DOCOMO, Assam
|
||||
"027", // TATA DOCOMO, Bihar
|
||||
"028", // TATA DOCOMO, Chennai
|
||||
"029", // TATA DOCOMO, Delhi
|
||||
"030", // TATA DOCOMO, Gujarat
|
||||
"031", // TATA DOCOMO, Haryana
|
||||
"032", // TATA DOCOMO, Himachal Pradesh
|
||||
"033", // Reliance, Bihar
|
||||
"034", // TATA DOCOMO, Kamataka
|
||||
"035", // TATA DOCOMO, Kerala
|
||||
"036", // TATA DOCOMO, Kolkata
|
||||
"037", // TATA DOCOMO, Maharashtra
|
||||
"038", // TATA DOCOMO, Madhya Pradesh
|
||||
"039", // TATA DOCOMO, Mumbai
|
||||
"040", // Reliance, Chennai
|
||||
"041", // TATA DOCOMO, Orissa
|
||||
"042", // TATA DOCOMO, Punjab
|
||||
"043", // TATA DOCOMO, Rajasthan
|
||||
"044", // TATA DOCOMO, Tamilnadu
|
||||
"045", // TATA DOCOMO, UP (East)
|
||||
"046", // TATA DOCOMO, UP (West)
|
||||
"047", // TATA DOCOMO, West Bengal
|
||||
"750", // Vodafone IN, J&K
|
||||
"751", // Vodafone IN, Assam
|
||||
"752", // Vodafone IN, Bihar
|
||||
"753", // Vodafone IN, Orissa
|
||||
"754", // Vodafone IN, Himachal Pradesh
|
||||
"755", // Vodafone IN, North East
|
||||
"756", // Vodafone IN, Madhya Pradesh & Chhattisgarh
|
||||
"799", // Idea, MUMBAI
|
||||
"800", // Aircell, Delhi
|
||||
"801", // Aircell, Andhra Pradesh
|
||||
"802", // Aircell, Gujarat
|
||||
"803", // Aircell, Kamataka
|
||||
"804", // Aircell, Maharashtra
|
||||
"805", // Aircell, Mumbai
|
||||
"806", // Aircell, Rajasthan
|
||||
"807", // Aircell, Haryana
|
||||
"808", // Aircell, Madhya Pradesh
|
||||
"809", // Aircell, Kerala
|
||||
"810", // Aircell, Uttar Pradesh (East)
|
||||
"811", // Aircell, Uttar Pradesh (West)
|
||||
"812", // Aircell, Punjab
|
||||
"818", // Uninor, Uttar Pradesh (West)
|
||||
"819", // Uninor, Andhra Pradesh
|
||||
"820", // Uninor, Karnataka
|
||||
"821", // Uninor, Kerala
|
||||
"822", // Uninor, Kolkata
|
||||
"824", // Videocon, Assam
|
||||
"827", // Videocon, Gujarat
|
||||
"834", // Videocon, Madhya Pradesh
|
||||
"840", // Jio, West Bengal
|
||||
"844", // Uninor, Delhi & NCR
|
||||
"845", // IDEA, Assam
|
||||
"846", // IDEA, Jammu & Kashmir
|
||||
"847", // IDEA, Karnataka
|
||||
"848", // IDEA, Kolkata
|
||||
"849", // IDEA, North East
|
||||
"850", // IDEA, Orissa
|
||||
"851", // IDEA, Punjab
|
||||
"852", // IDEA, Tamil Nadu
|
||||
"853", // IDEA, West Bengal
|
||||
"854", // Jio, Andra Pradesh
|
||||
"855", // Jio, Assam
|
||||
"856", // Jio, Bihar
|
||||
"857", // Jio, Gujarat
|
||||
"858", // Jio, Haryana
|
||||
"859", // Jio, Himachal Pradesh
|
||||
"860", // Jio, Jammu Kashmir
|
||||
"861", // Jio, Karnataka
|
||||
"862", // Jio, Kerala
|
||||
"863", // Jio, Madhyya Pradesh
|
||||
"864", // Jio, Maharashtra
|
||||
"865", // Jio, North East
|
||||
"866", // Jio, Orissa
|
||||
"867", // Jio, Punjab
|
||||
"868", // Jio, Rajasthan
|
||||
"869", // Jio, Tamil Nadu Chennai
|
||||
"870", // Jio, Uttar Pradesh West
|
||||
"871", // Jio, Uttar Pradesh East
|
||||
"872", // Jio, Delhi
|
||||
"873", // Jio, Kolkatta
|
||||
"874", // Jio, Mumbai
|
||||
"875", // Uninor, Assam
|
||||
"880", // Uninor, West Bengal
|
||||
"881", // S Tel, Assam
|
||||
"908", // IDEA, Andhra Pradesh
|
||||
"909", // IDEA, Delhi
|
||||
"910", // IDEA, Haryana
|
||||
"911", // Etisalat, Maharashtra
|
||||
"912", // Etisalat, Andhra Pradesh
|
||||
"913", // Etisalat, Delhi & NCR
|
||||
"914", // Etisalat, Gujarat
|
||||
"917", // Etisalat, Kerala
|
||||
"927", // Uninor, Gujarat
|
||||
"929" // Uninor, Maharashtra
|
||||
],
|
||||
// Malaysia.
|
||||
"502":
|
||||
["150", // Tune Talk Sdn Bhd
|
||||
"151", // Baraka Telecom Sdn Bhd (MVNE)
|
||||
"152", // YTL Communications Sdn Bhd
|
||||
"156" // Altel Communications Sdn Bhd
|
||||
],
|
||||
// Brazil.
|
||||
"724":
|
||||
["055" // Sercomtel
|
||||
]
|
||||
};
|
||||
|
||||
/**
|
||||
* The table for MCC which the length of MNC is 3
|
||||
*
|
||||
|
@ -2992,7 +3137,6 @@ this.MCC_TABLE_FOR_MNC_LENGTH_IS_3 = [
|
|||
"365", // Anguilla
|
||||
"366", // Dominica
|
||||
"376", // Turks and Caicos Islands
|
||||
"405", // India
|
||||
"708", // Honduras
|
||||
"722", // Argentina
|
||||
"732", // Colombia
|
||||
|
|
|
@ -14142,9 +14142,16 @@ ICCUtilsHelperObject.prototype = {
|
|||
// MCC is the first 3 digits of IMSI.
|
||||
let mcc = imsi.substr(0,3);
|
||||
if (!mncLength) {
|
||||
// Check the MCC table to decide the length of MNC.
|
||||
let index = MCC_TABLE_FOR_MNC_LENGTH_IS_3.indexOf(mcc);
|
||||
mncLength = (index !== -1) ? 3 : 2;
|
||||
// Check the MCC/MNC table for MNC length = 3 first for the case we don't
|
||||
// have the 4th byte data from EF_AD.
|
||||
if (PLMN_HAVING_3DIGITS_MNC[mcc] &&
|
||||
PLMN_HAVING_3DIGITS_MNC[mcc].indexOf(imsi.substr(3, 3)) !== -1) {
|
||||
mncLength = 3;
|
||||
} else {
|
||||
// Check the MCC table to decide the length of MNC.
|
||||
let index = MCC_TABLE_FOR_MNC_LENGTH_IS_3.indexOf(mcc);
|
||||
mncLength = (index !== -1) ? 3 : 2;
|
||||
}
|
||||
}
|
||||
let mnc = imsi.substr(3, mncLength);
|
||||
if (DEBUG) {
|
||||
|
|
|
@ -55,6 +55,23 @@ let emulator = (function() {
|
|||
* Telephony related helper functions.
|
||||
*/
|
||||
(function() {
|
||||
/**
|
||||
* @return Promise
|
||||
*/
|
||||
function delay(ms) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let startTime = Date.now();
|
||||
waitFor(function() {
|
||||
deferred.resolve();
|
||||
},function() {
|
||||
let duration = Date.now() - startTime;
|
||||
return (duration >= ms);
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Promise
|
||||
*/
|
||||
|
@ -1016,6 +1033,7 @@ let emulator = (function() {
|
|||
* Public members.
|
||||
*/
|
||||
|
||||
this.gDelay = delay;
|
||||
this.gCheckInitialState = checkInitialState;
|
||||
this.gClearCalls = clearCalls;
|
||||
this.gOutCallStrPool = outCallStrPool;
|
||||
|
|
|
@ -34,6 +34,7 @@ startTestWithPermissions(['mobileconnection'], function() {
|
|||
.then(() => gDial("112"))
|
||||
.then(call => { outCall = call; })
|
||||
.then(() => gRemoteAnswer(outCall))
|
||||
.then(() => gDelay(1000)) // See Bug 1018051 for the purpose of the delay.
|
||||
.then(() => gRemoteHangUp(outCall))
|
||||
.then(null, () => {
|
||||
ok(false, "promise rejects during test.");
|
||||
|
|
|
@ -530,13 +530,13 @@ AsyncPanZoomController::AsyncPanZoomController(uint64_t aLayersId,
|
|||
mSharingFrameMetricsAcrossProcesses(false),
|
||||
mMonitor("AsyncPanZoomController"),
|
||||
mTouchActionPropertyEnabled(gfxPrefs::TouchActionEnabled()),
|
||||
mState(NOTHING),
|
||||
mContentResponseTimeoutTask(nullptr),
|
||||
mX(MOZ_THIS_IN_INITIALIZER_LIST()),
|
||||
mY(MOZ_THIS_IN_INITIALIZER_LIST()),
|
||||
mPanDirRestricted(false),
|
||||
mZoomConstraints(false, false, MIN_ZOOM, MAX_ZOOM),
|
||||
mLastSampleTime(GetFrameTime()),
|
||||
mState(NOTHING),
|
||||
mLastAsyncScrollTime(GetFrameTime()),
|
||||
mLastAsyncScrollOffset(0, 0),
|
||||
mCurrentAsyncScrollOffset(0, 0),
|
||||
|
|
|
@ -319,6 +319,29 @@ public:
|
|||
bool IsPannable() const;
|
||||
|
||||
protected:
|
||||
enum PanZoomState {
|
||||
NOTHING, /* no touch-start events received */
|
||||
FLING, /* all touches removed, but we're still scrolling page */
|
||||
TOUCHING, /* one touch-start event received */
|
||||
|
||||
PANNING, /* panning the frame */
|
||||
PANNING_LOCKED_X, /* touch-start followed by move (i.e. panning with axis lock) X axis */
|
||||
PANNING_LOCKED_Y, /* as above for Y axis */
|
||||
|
||||
CROSS_SLIDING_X, /* Panning disabled while user does a horizontal gesture
|
||||
on a vertically-scrollable view. This used for the
|
||||
Windows Metro "cross-slide" gesture. */
|
||||
CROSS_SLIDING_Y, /* as above for Y axis */
|
||||
|
||||
PINCHING, /* nth touch-start, where n > 1. this mode allows pan and zoom */
|
||||
ANIMATING_ZOOM, /* animated zoom to a new rect */
|
||||
WAITING_CONTENT_RESPONSE, /* a state halfway between NOTHING and TOUCHING - the user has
|
||||
put a finger down, but we don't yet know if a touch listener has
|
||||
prevented the default actions yet and the allowed touch behavior
|
||||
was not set yet. we still need to abort animations. */
|
||||
SNAP_BACK, /* snap-back animation to relieve overscroll */
|
||||
};
|
||||
|
||||
// Protected destructor, to discourage deletion outside of Release():
|
||||
~AsyncPanZoomController();
|
||||
|
||||
|
@ -519,29 +542,6 @@ protected:
|
|||
void FireAsyncScrollOnTimeout();
|
||||
|
||||
private:
|
||||
enum PanZoomState {
|
||||
NOTHING, /* no touch-start events received */
|
||||
FLING, /* all touches removed, but we're still scrolling page */
|
||||
TOUCHING, /* one touch-start event received */
|
||||
|
||||
PANNING, /* panning the frame */
|
||||
PANNING_LOCKED_X, /* touch-start followed by move (i.e. panning with axis lock) X axis */
|
||||
PANNING_LOCKED_Y, /* as above for Y axis */
|
||||
|
||||
CROSS_SLIDING_X, /* Panning disabled while user does a horizontal gesture
|
||||
on a vertically-scrollable view. This used for the
|
||||
Windows Metro "cross-slide" gesture. */
|
||||
CROSS_SLIDING_Y, /* as above for Y axis */
|
||||
|
||||
PINCHING, /* nth touch-start, where n > 1. this mode allows pan and zoom */
|
||||
ANIMATING_ZOOM, /* animated zoom to a new rect */
|
||||
WAITING_CONTENT_RESPONSE, /* a state halfway between NOTHING and TOUCHING - the user has
|
||||
put a finger down, but we don't yet know if a touch listener has
|
||||
prevented the default actions yet and the allowed touch behavior
|
||||
was not set yet. we still need to abort animations. */
|
||||
SNAP_BACK, /* snap-back animation to relieve overscroll */
|
||||
};
|
||||
|
||||
// State related to a single touch block. Does not persist across touch blocks.
|
||||
struct TouchBlockState {
|
||||
|
||||
|
@ -690,6 +690,10 @@ protected:
|
|||
// (e.g. with the gtest framework).
|
||||
bool mTouchActionPropertyEnabled;
|
||||
|
||||
// Stores the state of panning and zooming this frame. This is protected by
|
||||
// |mMonitor|; that is, it should be held whenever this is updated.
|
||||
PanZoomState mState;
|
||||
|
||||
private:
|
||||
// Metrics of the container layer corresponding to this APZC. This is
|
||||
// stored here so that it is accessible from the UI/controller thread.
|
||||
|
@ -732,10 +736,6 @@ private:
|
|||
// to allow panning by moving multiple fingers (thus moving the focus point).
|
||||
ParentLayerPoint mLastZoomFocus;
|
||||
|
||||
// Stores the state of panning and zooming this frame. This is protected by
|
||||
// |mMonitor|; that is, it should be held whenever this is updated.
|
||||
PanZoomState mState;
|
||||
|
||||
// The last time and offset we fire the mozbrowserasyncscroll event when
|
||||
// compositor has sampled the content transform for this frame.
|
||||
TimeStamp mLastAsyncScrollTime;
|
||||
|
|
|
@ -139,6 +139,11 @@ public:
|
|||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
return mFrameMetrics;
|
||||
}
|
||||
|
||||
void AssertStateIsReset() {
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
EXPECT_EQ(NOTHING, mState);
|
||||
}
|
||||
};
|
||||
|
||||
class TestAPZCTreeManager : public APZCTreeManager {
|
||||
|
@ -841,6 +846,7 @@ TEST_F(AsyncPanZoomControllerTester, ShortPress) {
|
|||
EXPECT_CALL(*mcc, HandleSingleTap(CSSPoint(10, 10), 0, apzc->GetGuid())).Times(1);
|
||||
mcc->RunDelayedTask();
|
||||
|
||||
apzc->AssertStateIsReset();
|
||||
apzc->Destroy();
|
||||
}
|
||||
|
||||
|
@ -865,6 +871,7 @@ TEST_F(AsyncPanZoomControllerTester, MediumPress) {
|
|||
EXPECT_CALL(*mcc, HandleSingleTap(CSSPoint(10, 10), 0, apzc->GetGuid())).Times(1);
|
||||
mcc->RunDelayedTask();
|
||||
|
||||
apzc->AssertStateIsReset();
|
||||
apzc->Destroy();
|
||||
}
|
||||
|
||||
|
@ -934,6 +941,7 @@ DoLongPressTest(bool aShouldUseTouchAction, uint32_t aBehavior) {
|
|||
apzc->ContentReceivedTouch(false);
|
||||
check.Call("postHandleLongTapUp");
|
||||
|
||||
apzc->AssertStateIsReset();
|
||||
apzc->Destroy();
|
||||
}
|
||||
|
||||
|
@ -1020,6 +1028,7 @@ DoLongPressPreventDefaultTest(bool aShouldUseTouchAction, uint32_t aBehavior) {
|
|||
EXPECT_EQ(ScreenPoint(), pointOut);
|
||||
EXPECT_EQ(ViewTransform(), viewTransformOut);
|
||||
|
||||
apzc->AssertStateIsReset();
|
||||
apzc->Destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -11,82 +11,7 @@
|
|||
// we use a void* for Visual*). The Xlib headers are highly polluting so we try
|
||||
// hard to limit their spread into the rest of the code.
|
||||
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
typedef struct _GdkDrawable GdkWindow;
|
||||
#else
|
||||
typedef struct _GdkWindow GdkWindow;
|
||||
#endif
|
||||
typedef struct _GtkWidget GtkWidget;
|
||||
typedef unsigned long XID;
|
||||
typedef struct _XDisplay Display;
|
||||
|
||||
namespace base {
|
||||
class Thread;
|
||||
}
|
||||
namespace x11_util {
|
||||
|
||||
// These functions use the GDK default display and this /must/ be called from
|
||||
// the UI thread. Thus, they don't support multiple displays.
|
||||
|
||||
// These functions cache their results.
|
||||
|
||||
// Return an X11 connection for the current, primary display.
|
||||
Display* GetXDisplay();
|
||||
// Return true iff the connection supports X shared memory
|
||||
bool QuerySharedMemorySupport(Display* dpy);
|
||||
// Return true iff the display supports Xrender
|
||||
bool QueryRenderSupport(Display* dpy);
|
||||
// Return the default screen number for the display
|
||||
int GetDefaultScreen(Display* display);
|
||||
|
||||
// These functions do not cache their results
|
||||
|
||||
// Get the X window id for the default root window
|
||||
XID GetX11RootWindow();
|
||||
// Get the X window id for the given GTK widget.
|
||||
XID GetX11WindowFromGtkWidget(GtkWidget*);
|
||||
XID GetX11WindowFromGdkWindow(GdkWindow*);
|
||||
// Get a Visual from the given widget. Since we don't include the Xlib
|
||||
// headers, this is returned as a void*.
|
||||
void* GetVisualFromGtkWidget(GtkWidget*);
|
||||
// Return the number of bits-per-pixel for a pixmap of the given depth
|
||||
int BitsPerPixelForPixmapDepth(Display*, int depth);
|
||||
|
||||
// Return a handle to a server side pixmap. |shared_memory_key| is a SysV
|
||||
// IPC key. The shared memory region must contain 32-bit pixels.
|
||||
XID AttachSharedMemory(Display* display, int shared_memory_support);
|
||||
void DetachSharedMemory(Display* display, XID shmseg);
|
||||
|
||||
// Return a handle to an XRender picture where |pixmap| is a handle to a
|
||||
// pixmap containing Skia ARGB data.
|
||||
XID CreatePictureFromSkiaPixmap(Display* display, XID pixmap);
|
||||
|
||||
void FreePicture(Display* display, XID picture);
|
||||
void FreePixmap(Display* display, XID pixmap);
|
||||
|
||||
// These functions are for performing X opertions outside of the UI thread.
|
||||
|
||||
// Return the Display for the secondary X connection. We keep a second
|
||||
// connection around for making X requests outside of the UI thread.
|
||||
// This function may only be called from the BACKGROUND_X11 thread.
|
||||
Display* GetSecondaryDisplay();
|
||||
|
||||
// Since one cannot include both WebKit header and Xlib headers in the same
|
||||
// file (due to collisions), we wrap all the Xlib functions that we need here.
|
||||
// These functions must be called on the BACKGROUND_X11 thread since they
|
||||
// reference GetSecondaryDisplay().
|
||||
|
||||
// Get the position of the given window in screen coordinates as well as its
|
||||
// current size.
|
||||
bool GetWindowGeometry(int* x, int* y, unsigned* width, unsigned* height,
|
||||
XID window);
|
||||
|
||||
// Find the immediate parent of an X window.
|
||||
//
|
||||
// parent_window: (output) the parent window of |window|, or 0.
|
||||
// parent_is_root: (output) true iff the parent of |window| is the root window.
|
||||
bool GetWindowParent(XID* parent_window, bool* parent_is_root, XID window);
|
||||
|
||||
} // namespace x11_util
|
||||
|
||||
#endif // CHROME_COMMON_X11_UTIL_H_
|
||||
|
|
|
@ -574,6 +574,22 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
|
|||
} else {
|
||||
newEnvVars["LD_LIBRARY_PATH"] = path.get();
|
||||
}
|
||||
|
||||
# if (MOZ_WIDGET_GTK == 3)
|
||||
const char *ld_preload = PR_GetEnv("LD_PRELOAD");
|
||||
nsCString new_ld_preload;
|
||||
|
||||
new_ld_preload.Assign(path.get());
|
||||
new_ld_preload.AppendLiteral("/" DLL_PREFIX "mozgtk2" DLL_SUFFIX);
|
||||
|
||||
if (ld_preload && *ld_preload) {
|
||||
new_ld_preload.AppendLiteral(":");
|
||||
new_ld_preload.Append(ld_preload);
|
||||
}
|
||||
newEnvVars["LD_PRELOAD"] = new_ld_preload.get();
|
||||
# endif // MOZ_WIDGET_GTK
|
||||
|
||||
|
||||
# elif OS_MACOSX
|
||||
newEnvVars["DYLD_LIBRARY_PATH"] = path.get();
|
||||
// XXX DYLD_INSERT_LIBRARIES should only be set when launching a plugin
|
||||
|
|
|
@ -140,7 +140,8 @@ include('/ipc/chromium/chromium-config.mozbuild')
|
|||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE'):
|
||||
for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE',
|
||||
'DLL_PREFIX', 'DLL_SUFFIX'):
|
||||
DEFINES[var] = '"%s"' % CONFIG[var]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
|
|
|
@ -1573,11 +1573,11 @@ Neuter(JSContext *cx, unsigned argc, jsval *vp)
|
|||
}
|
||||
|
||||
static bool
|
||||
WorkerThreadCount(JSContext *cx, unsigned argc, jsval *vp)
|
||||
HelperThreadCount(JSContext *cx, unsigned argc, jsval *vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
#ifdef JS_THREADSAFE
|
||||
args.rval().setInt32(WorkerThreadState().threadCount);
|
||||
args.rval().setInt32(HelperThreadState().threadCount);
|
||||
#else
|
||||
args.rval().setInt32(0);
|
||||
#endif
|
||||
|
@ -1905,9 +1905,9 @@ static const JSFunctionSpecWithHelp TestingFunctions[] = {
|
|||
" \"same-data\" will leave it set to its original value, to mimic eg\n"
|
||||
" asm.js ArrayBuffer neutering."),
|
||||
|
||||
JS_FN_HELP("workerThreadCount", WorkerThreadCount, 0, 0,
|
||||
"workerThreadCount()",
|
||||
" Returns the number of worker threads available for off-main-thread tasks."),
|
||||
JS_FN_HELP("helperThreadCount", HelperThreadCount, 0, 0,
|
||||
"helperThreadCount()",
|
||||
" Returns the number of helper threads available for off-main-thread tasks."),
|
||||
|
||||
JS_FN_HELP("startTraceLogger", EnableTraceLogger, 0, 0,
|
||||
"startTraceLogger()",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
load(libdir + 'asserts.js');
|
||||
|
||||
if (workerThreadCount() === 0)
|
||||
if (helperThreadCount() === 0)
|
||||
quit(0);
|
||||
|
||||
offThreadCompileScript('Math.sin(Math.PI/2)');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// We still get onNewScript notifications for code compiled off the main thread.
|
||||
|
||||
if (workerThreadCount() === 0)
|
||||
if (helperThreadCount() === 0)
|
||||
quit(0);
|
||||
|
||||
var g = newGlobal();
|
||||
|
|
|
@ -5571,7 +5571,7 @@ CheckFunctionsSequential(ModuleCompiler &m)
|
|||
|
||||
// Currently, only one asm.js parallel compilation is allowed at a time.
|
||||
// This RAII class attempts to claim this parallel compilation using atomic ops
|
||||
// on rt->workerThreadState->asmJSCompilationInProgress.
|
||||
// on the helper thread state's asmJSCompilationInProgress.
|
||||
class ParallelCompilationGuard
|
||||
{
|
||||
bool parallelState_;
|
||||
|
@ -5579,13 +5579,13 @@ class ParallelCompilationGuard
|
|||
ParallelCompilationGuard() : parallelState_(false) {}
|
||||
~ParallelCompilationGuard() {
|
||||
if (parallelState_) {
|
||||
JS_ASSERT(WorkerThreadState().asmJSCompilationInProgress == true);
|
||||
WorkerThreadState().asmJSCompilationInProgress = false;
|
||||
JS_ASSERT(HelperThreadState().asmJSCompilationInProgress == true);
|
||||
HelperThreadState().asmJSCompilationInProgress = false;
|
||||
}
|
||||
}
|
||||
bool claim() {
|
||||
JS_ASSERT(!parallelState_);
|
||||
if (!WorkerThreadState().asmJSCompilationInProgress.compareExchange(false, true))
|
||||
if (!HelperThreadState().asmJSCompilationInProgress.compareExchange(false, true))
|
||||
return false;
|
||||
parallelState_ = true;
|
||||
return true;
|
||||
|
@ -5597,11 +5597,11 @@ ParallelCompilationEnabled(ExclusiveContext *cx)
|
|||
{
|
||||
// If 'cx' isn't a JSContext, then we are already off the main thread so
|
||||
// off-thread compilation must be enabled. However, since there are a fixed
|
||||
// number of worker threads and one is already being consumed by this
|
||||
// number of helper threads and one is already being consumed by this
|
||||
// parsing task, ensure that there another free thread to avoid deadlock.
|
||||
// (Note: there is at most one thread used for parsing so we don't have to
|
||||
// worry about general dining philosophers.)
|
||||
if (WorkerThreadState().threadCount <= 1)
|
||||
if (HelperThreadState().threadCount <= 1)
|
||||
return false;
|
||||
|
||||
if (!cx->isJSContext())
|
||||
|
@ -5621,18 +5621,18 @@ struct ParallelGroupState
|
|||
{ }
|
||||
};
|
||||
|
||||
// Block until a worker-assigned LifoAlloc becomes finished.
|
||||
// Block until a helper-assigned LifoAlloc becomes finished.
|
||||
static AsmJSParallelTask *
|
||||
GetFinishedCompilation(ModuleCompiler &m, ParallelGroupState &group)
|
||||
{
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
while (!WorkerThreadState().asmJSWorkerFailed()) {
|
||||
if (!WorkerThreadState().asmJSFinishedList().empty()) {
|
||||
while (!HelperThreadState().asmJSFailed()) {
|
||||
if (!HelperThreadState().asmJSFinishedList().empty()) {
|
||||
group.outstandingJobs--;
|
||||
return WorkerThreadState().asmJSFinishedList().popCopy();
|
||||
return HelperThreadState().asmJSFinishedList().popCopy();
|
||||
}
|
||||
WorkerThreadState().wait(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().wait(GlobalHelperThreadState::CONSUMER);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
@ -5658,7 +5658,7 @@ GenerateCodeForFinishedJob(ModuleCompiler &m, ParallelGroupState &group, AsmJSPa
|
|||
|
||||
group.compiledJobs++;
|
||||
|
||||
// Clear the LifoAlloc for use by another worker.
|
||||
// Clear the LifoAlloc for use by another helper.
|
||||
TempAllocator &tempAlloc = task->mir->alloc();
|
||||
tempAlloc.TempAllocator::~TempAllocator();
|
||||
task->lifo.releaseAll();
|
||||
|
@ -5672,7 +5672,7 @@ GetUnusedTask(ParallelGroupState &group, uint32_t i, AsmJSParallelTask **outTask
|
|||
{
|
||||
// Since functions are dispatched in order, if fewer than |numLifos| functions
|
||||
// have been generated, then the |i'th| LifoAlloc must never have been
|
||||
// assigned to a worker thread.
|
||||
// assigned to a helper thread.
|
||||
if (i >= group.tasks.length())
|
||||
return false;
|
||||
*outTask = &group.tasks[i];
|
||||
|
@ -5684,12 +5684,12 @@ CheckFunctionsParallelImpl(ModuleCompiler &m, ParallelGroupState &group)
|
|||
{
|
||||
#ifdef DEBUG
|
||||
{
|
||||
AutoLockWorkerThreadState lock;
|
||||
JS_ASSERT(WorkerThreadState().asmJSWorklist().empty());
|
||||
JS_ASSERT(WorkerThreadState().asmJSFinishedList().empty());
|
||||
AutoLockHelperThreadState lock;
|
||||
JS_ASSERT(HelperThreadState().asmJSWorklist().empty());
|
||||
JS_ASSERT(HelperThreadState().asmJSFinishedList().empty());
|
||||
}
|
||||
#endif
|
||||
WorkerThreadState().resetAsmJSFailureState();
|
||||
HelperThreadState().resetAsmJSFailureState();
|
||||
|
||||
for (unsigned i = 0; PeekToken(m.parser()) == TOK_FUNCTION; i++) {
|
||||
// Get exclusive access to an empty LifoAlloc from the thread group's pool.
|
||||
|
@ -5703,7 +5703,7 @@ CheckFunctionsParallelImpl(ModuleCompiler &m, ParallelGroupState &group)
|
|||
if (!CheckFunction(m, task->lifo, &mir, &func))
|
||||
return false;
|
||||
|
||||
// Perform optimizations and LIR generation on a worker thread.
|
||||
// Perform optimizations and LIR generation on a helper thread.
|
||||
task->init(m.cx()->compartment()->runtimeFromAnyThread(), func, mir);
|
||||
if (!StartOffThreadAsmJSCompile(m.cx(), task))
|
||||
return false;
|
||||
|
@ -5711,7 +5711,7 @@ CheckFunctionsParallelImpl(ModuleCompiler &m, ParallelGroupState &group)
|
|||
group.outstandingJobs++;
|
||||
}
|
||||
|
||||
// Block for all outstanding workers to complete.
|
||||
// Block for all outstanding helpers to complete.
|
||||
while (group.outstandingJobs > 0) {
|
||||
AsmJSParallelTask *ignored = nullptr;
|
||||
if (!GenerateCodeForFinishedJob(m, group, &ignored))
|
||||
|
@ -5725,12 +5725,12 @@ CheckFunctionsParallelImpl(ModuleCompiler &m, ParallelGroupState &group)
|
|||
JS_ASSERT(group.compiledJobs == m.numFunctions());
|
||||
#ifdef DEBUG
|
||||
{
|
||||
AutoLockWorkerThreadState lock;
|
||||
JS_ASSERT(WorkerThreadState().asmJSWorklist().empty());
|
||||
JS_ASSERT(WorkerThreadState().asmJSFinishedList().empty());
|
||||
AutoLockHelperThreadState lock;
|
||||
JS_ASSERT(HelperThreadState().asmJSWorklist().empty());
|
||||
JS_ASSERT(HelperThreadState().asmJSFinishedList().empty());
|
||||
}
|
||||
#endif
|
||||
JS_ASSERT(!WorkerThreadState().asmJSWorkerFailed());
|
||||
JS_ASSERT(!HelperThreadState().asmJSFailed());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5741,38 +5741,38 @@ CancelOutstandingJobs(ModuleCompiler &m, ParallelGroupState &group)
|
|||
// The problem is that all memory for compilation is stored in LifoAllocs
|
||||
// maintained in the scope of CheckFunctionsParallel() -- so in order
|
||||
// for that function to safely return, and thereby remove the LifoAllocs,
|
||||
// none of that memory can be in use or reachable by workers.
|
||||
// none of that memory can be in use or reachable by helpers.
|
||||
|
||||
JS_ASSERT(group.outstandingJobs >= 0);
|
||||
if (!group.outstandingJobs)
|
||||
return;
|
||||
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
// From the compiling tasks, eliminate those waiting for worker assignation.
|
||||
group.outstandingJobs -= WorkerThreadState().asmJSWorklist().length();
|
||||
WorkerThreadState().asmJSWorklist().clear();
|
||||
// From the compiling tasks, eliminate those waiting for helper assignation.
|
||||
group.outstandingJobs -= HelperThreadState().asmJSWorklist().length();
|
||||
HelperThreadState().asmJSWorklist().clear();
|
||||
|
||||
// From the compiling tasks, eliminate those waiting for codegen.
|
||||
group.outstandingJobs -= WorkerThreadState().asmJSFinishedList().length();
|
||||
WorkerThreadState().asmJSFinishedList().clear();
|
||||
group.outstandingJobs -= HelperThreadState().asmJSFinishedList().length();
|
||||
HelperThreadState().asmJSFinishedList().clear();
|
||||
|
||||
// Eliminate tasks that failed without adding to the finished list.
|
||||
group.outstandingJobs -= WorkerThreadState().harvestFailedAsmJSJobs();
|
||||
group.outstandingJobs -= HelperThreadState().harvestFailedAsmJSJobs();
|
||||
|
||||
// Any remaining tasks are therefore undergoing active compilation.
|
||||
JS_ASSERT(group.outstandingJobs >= 0);
|
||||
while (group.outstandingJobs > 0) {
|
||||
WorkerThreadState().wait(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().wait(GlobalHelperThreadState::CONSUMER);
|
||||
|
||||
group.outstandingJobs -= WorkerThreadState().harvestFailedAsmJSJobs();
|
||||
group.outstandingJobs -= WorkerThreadState().asmJSFinishedList().length();
|
||||
WorkerThreadState().asmJSFinishedList().clear();
|
||||
group.outstandingJobs -= HelperThreadState().harvestFailedAsmJSJobs();
|
||||
group.outstandingJobs -= HelperThreadState().asmJSFinishedList().length();
|
||||
HelperThreadState().asmJSFinishedList().clear();
|
||||
}
|
||||
|
||||
JS_ASSERT(group.outstandingJobs == 0);
|
||||
JS_ASSERT(WorkerThreadState().asmJSWorklist().empty());
|
||||
JS_ASSERT(WorkerThreadState().asmJSFinishedList().empty());
|
||||
JS_ASSERT(HelperThreadState().asmJSWorklist().empty());
|
||||
JS_ASSERT(HelperThreadState().asmJSFinishedList().empty());
|
||||
}
|
||||
|
||||
static const size_t LIFO_ALLOC_PARALLEL_CHUNK_SIZE = 1 << 12;
|
||||
|
@ -5783,7 +5783,7 @@ CheckFunctionsParallel(ModuleCompiler &m)
|
|||
// If parallel compilation isn't enabled (not enough cores, disabled by
|
||||
// pref, etc) or another thread is currently compiling asm.js in parallel,
|
||||
// fall back to sequential compilation. (We could lift the latter
|
||||
// constraint by hoisting asmJS* state out of WorkerThreadState so multiple
|
||||
// constraint by hoisting asmJS* state out of HelperThreadState so multiple
|
||||
// concurrent asm.js parallel compilations don't race.)
|
||||
ParallelCompilationGuard g;
|
||||
if (!ParallelCompilationEnabled(m.cx()) || !g.claim())
|
||||
|
@ -5791,8 +5791,8 @@ CheckFunctionsParallel(ModuleCompiler &m)
|
|||
|
||||
IonSpew(IonSpew_Logs, "Can't log asm.js script. (Compiled on background thread.)");
|
||||
|
||||
// Saturate all worker threads plus the main thread.
|
||||
size_t numParallelJobs = WorkerThreadState().threadCount + 1;
|
||||
// Saturate all helper threads plus the main thread.
|
||||
size_t numParallelJobs = HelperThreadState().threadCount + 1;
|
||||
|
||||
// Allocate scoped AsmJSParallelTask objects. Each contains a unique
|
||||
// LifoAlloc that provides all necessary memory for compilation.
|
||||
|
@ -5803,13 +5803,13 @@ CheckFunctionsParallel(ModuleCompiler &m)
|
|||
for (size_t i = 0; i < numParallelJobs; i++)
|
||||
tasks.infallibleAppend(LIFO_ALLOC_PARALLEL_CHUNK_SIZE);
|
||||
|
||||
// With compilation memory in-scope, dispatch worker threads.
|
||||
// With compilation memory in-scope, dispatch helper threads.
|
||||
ParallelGroupState group(tasks);
|
||||
if (!CheckFunctionsParallelImpl(m, group)) {
|
||||
CancelOutstandingJobs(m, group);
|
||||
|
||||
// If failure was triggered by a worker thread, report error.
|
||||
if (void *maybeFunc = WorkerThreadState().maybeAsmJSFailedFunction()) {
|
||||
// If failure was triggered by a helper thread, report error.
|
||||
if (void *maybeFunc = HelperThreadState().maybeAsmJSFailedFunction()) {
|
||||
ModuleCompiler::Func *func = reinterpret_cast<ModuleCompiler::Func *>(maybeFunc);
|
||||
return m.failOffset(func->srcOffset(), "allocation failure during compilation");
|
||||
}
|
||||
|
@ -7073,7 +7073,7 @@ EstablishPreconditions(ExclusiveContext *cx, AsmJSParser &parser)
|
|||
|
||||
#ifdef JS_THREADSAFE
|
||||
if (ParallelCompilationEnabled(cx))
|
||||
EnsureWorkerThreadsInitialized(cx);
|
||||
EnsureHelperThreadsInitialized(cx);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "jit/IonLinker.h"
|
||||
#include "jit/IonOptimizationLevels.h"
|
||||
#include "jit/IonSpewer.h"
|
||||
#include "jit/Lowering.h"
|
||||
#include "jit/MIRGenerator.h"
|
||||
#include "jit/MoveEmitter.h"
|
||||
#include "jit/ParallelFunctions.h"
|
||||
|
@ -1224,6 +1225,9 @@ class OutOfLineInterruptCheckImplicit : public OutOfLineCodeBase<CodeGenerator>
|
|||
}
|
||||
};
|
||||
|
||||
typedef bool (*InterruptCheckFn)(JSContext *);
|
||||
static const VMFunction InterruptCheckInfo = FunctionInfo<InterruptCheckFn>(InterruptCheck);
|
||||
|
||||
bool
|
||||
CodeGenerator::visitOutOfLineInterruptCheckImplicit(OutOfLineInterruptCheckImplicit *ool)
|
||||
{
|
||||
|
@ -1565,14 +1569,57 @@ CodeGenerator::visitSlots(LSlots *lir)
|
|||
}
|
||||
|
||||
bool
|
||||
CodeGenerator::visitStoreSlotV(LStoreSlotV *store)
|
||||
CodeGenerator::visitLoadSlotT(LLoadSlotT *lir)
|
||||
{
|
||||
Register base = ToRegister(store->slots());
|
||||
int32_t offset = store->mir()->slot() * sizeof(Value);
|
||||
Register base = ToRegister(lir->slots());
|
||||
int32_t offset = lir->mir()->slot() * sizeof(js::Value);
|
||||
AnyRegister result = ToAnyRegister(lir->output());
|
||||
|
||||
const ValueOperand value = ToValue(store, LStoreSlotV::Value);
|
||||
masm.loadUnboxedValue(Address(base, offset), lir->mir()->type(), result);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (store->mir()->needsBarrier())
|
||||
bool
|
||||
CodeGenerator::visitLoadSlotV(LLoadSlotV *lir)
|
||||
{
|
||||
ValueOperand dest = ToOutValue(lir);
|
||||
Register base = ToRegister(lir->input());
|
||||
int32_t offset = lir->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
masm.loadValue(Address(base, offset), dest);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGenerator::visitStoreSlotT(LStoreSlotT *lir)
|
||||
{
|
||||
Register base = ToRegister(lir->slots());
|
||||
int32_t offset = lir->mir()->slot() * sizeof(js::Value);
|
||||
Address dest(base, offset);
|
||||
|
||||
if (lir->mir()->needsBarrier())
|
||||
emitPreBarrier(dest, lir->mir()->slotType());
|
||||
|
||||
MIRType valueType = lir->mir()->value()->type();
|
||||
ConstantOrRegister value;
|
||||
if (lir->value()->isConstant())
|
||||
value = ConstantOrRegister(*lir->value()->toConstant());
|
||||
else
|
||||
value = TypedOrValueRegister(valueType, ToAnyRegister(lir->value()));
|
||||
|
||||
masm.storeUnboxedValue(value, valueType, dest, lir->mir()->slotType());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGenerator::visitStoreSlotV(LStoreSlotV *lir)
|
||||
{
|
||||
Register base = ToRegister(lir->slots());
|
||||
int32_t offset = lir->mir()->slot() * sizeof(Value);
|
||||
|
||||
const ValueOperand value = ToValue(lir, LStoreSlotV::Value);
|
||||
|
||||
if (lir->mir()->needsBarrier())
|
||||
emitPreBarrier(Address(base, offset), MIRType_Value);
|
||||
|
||||
masm.storeValue(value, Address(base, offset));
|
||||
|
@ -5633,6 +5680,25 @@ CodeGenerator::emitStoreHoleCheck(Register elements, const LAllocation *index, L
|
|||
return bailoutFrom(&bail, snapshot);
|
||||
}
|
||||
|
||||
void
|
||||
CodeGenerator::emitStoreElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index)
|
||||
{
|
||||
ConstantOrRegister v;
|
||||
if (value->isConstant())
|
||||
v = ConstantOrRegister(*value->toConstant());
|
||||
else
|
||||
v = TypedOrValueRegister(valueType, ToAnyRegister(value));
|
||||
|
||||
if (index->isConstant()) {
|
||||
Address dest(elements, ToInt32(index) * sizeof(js::Value));
|
||||
masm.storeUnboxedValue(v, valueType, dest, elementType);
|
||||
} else {
|
||||
BaseIndex dest(elements, ToRegister(index), TimesEight);
|
||||
masm.storeUnboxedValue(v, valueType, dest, elementType);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGenerator::visitStoreElementT(LStoreElementT *store)
|
||||
{
|
||||
|
@ -5645,8 +5711,8 @@ CodeGenerator::visitStoreElementT(LStoreElementT *store)
|
|||
if (store->mir()->needsHoleCheck() && !emitStoreHoleCheck(elements, index, store->snapshot()))
|
||||
return false;
|
||||
|
||||
storeElementTyped(store->value(), store->mir()->value()->type(), store->mir()->elementType(),
|
||||
elements, index);
|
||||
emitStoreElementTyped(store->value(), store->mir()->value()->type(), store->mir()->elementType(),
|
||||
elements, index);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5688,8 +5754,8 @@ CodeGenerator::visitStoreElementHoleT(LStoreElementHoleT *lir)
|
|||
emitPreBarrier(elements, index, lir->mir()->elementType());
|
||||
|
||||
masm.bind(ool->rejoinStore());
|
||||
storeElementTyped(lir->value(), lir->mir()->value()->type(), lir->mir()->elementType(),
|
||||
elements, index);
|
||||
emitStoreElementTyped(lir->value(), lir->mir()->value()->type(), lir->mir()->elementType(),
|
||||
elements, index);
|
||||
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
|
@ -5794,8 +5860,8 @@ CodeGenerator::visitOutOfLineStoreElementHole(OutOfLineStoreElementHole *ool)
|
|||
// The inline path for StoreElementHoleT does not always store the type tag,
|
||||
// so we do the store on the OOL path. We use MIRType_None for the element type
|
||||
// so that storeElementTyped will always store the type tag.
|
||||
storeElementTyped(ins->toStoreElementHoleT()->value(), valueType, MIRType_None, elements,
|
||||
index);
|
||||
emitStoreElementTyped(ins->toStoreElementHoleT()->value(), valueType, MIRType_None,
|
||||
elements, index);
|
||||
masm.jump(ool->rejoin());
|
||||
} else {
|
||||
// Jump to the inline path where we will store the value.
|
||||
|
@ -7666,6 +7732,38 @@ CodeGenerator::visitToIdV(LToIdV *lir)
|
|||
return true;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool
|
||||
CodeGenerator::emitLoadElementT(LLoadElementT *lir, const T &source)
|
||||
{
|
||||
if (LIRGenerator::allowTypedElementHoleCheck()) {
|
||||
if (lir->mir()->needsHoleCheck()) {
|
||||
Assembler::Condition cond = masm.testMagic(Assembler::Equal, source);
|
||||
if (!bailoutIf(cond, lir->snapshot()))
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
MOZ_ASSERT(!lir->mir()->needsHoleCheck());
|
||||
}
|
||||
|
||||
AnyRegister output = ToAnyRegister(lir->output());
|
||||
if (lir->mir()->loadDoubles())
|
||||
masm.loadDouble(source, output.fpu());
|
||||
else
|
||||
masm.loadUnboxedValue(source, lir->mir()->type(), output);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGenerator::visitLoadElementT(LLoadElementT *lir)
|
||||
{
|
||||
Register elements = ToRegister(lir->elements());
|
||||
const LAllocation *index = lir->index();
|
||||
if (index->isConstant())
|
||||
return emitLoadElementT(lir, Address(elements, ToInt32(index) * sizeof(js::Value)));
|
||||
return emitLoadElementT(lir, BaseIndex(elements, ToRegister(index), TimesEight));
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGenerator::visitLoadElementV(LLoadElementV *load)
|
||||
{
|
||||
|
@ -8691,6 +8789,19 @@ CodeGenerator::visitAssertRangeV(LAssertRangeV *ins)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGenerator::visitInterruptCheck(LInterruptCheck *lir)
|
||||
{
|
||||
OutOfLineCode *ool = oolCallVM(InterruptCheckInfo, lir, (ArgList()), StoreNothing());
|
||||
if (!ool)
|
||||
return false;
|
||||
|
||||
AbsoluteAddress interruptAddr(GetIonContext()->runtime->addressOfInterrupt());
|
||||
masm.branch32(Assembler::NotEqual, interruptAddr, Imm32(0), ool->entry());
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef bool (*RecompileFn)(JSContext *);
|
||||
static const VMFunction RecompileFnInfo = FunctionInfo<RecompileFn>(Recompile);
|
||||
|
||||
|
|
|
@ -106,7 +106,10 @@ class CodeGenerator : public CodeGeneratorSpecific
|
|||
bool visitLambdaPar(LLambdaPar *lir);
|
||||
bool visitPointer(LPointer *lir);
|
||||
bool visitSlots(LSlots *lir);
|
||||
bool visitStoreSlotV(LStoreSlotV *store);
|
||||
bool visitLoadSlotT(LLoadSlotT *lir);
|
||||
bool visitLoadSlotV(LLoadSlotV *lir);
|
||||
bool visitStoreSlotT(LStoreSlotT *lir);
|
||||
bool visitStoreSlotV(LStoreSlotV *lir);
|
||||
bool visitElements(LElements *lir);
|
||||
bool visitConvertElementsToDoubles(LConvertElementsToDoubles *lir);
|
||||
bool visitMaybeToDoubleElement(LMaybeToDoubleElement *lir);
|
||||
|
@ -228,6 +231,8 @@ class CodeGenerator : public CodeGeneratorSpecific
|
|||
bool visitTypeOfV(LTypeOfV *lir);
|
||||
bool visitOutOfLineTypeOfV(OutOfLineTypeOfV *ool);
|
||||
bool visitToIdV(LToIdV *lir);
|
||||
template<typename T> bool emitLoadElementT(LLoadElementT *lir, const T &source);
|
||||
bool visitLoadElementT(LLoadElementT *lir);
|
||||
bool visitLoadElementV(LLoadElementV *load);
|
||||
bool visitLoadElementHole(LLoadElementHole *lir);
|
||||
bool visitStoreElementT(LStoreElementT *lir);
|
||||
|
@ -346,6 +351,7 @@ class CodeGenerator : public CodeGeneratorSpecific
|
|||
bool visitAssertRangeF(LAssertRangeF *ins);
|
||||
bool visitAssertRangeV(LAssertRangeV *ins);
|
||||
|
||||
bool visitInterruptCheck(LInterruptCheck *lir);
|
||||
bool visitRecompileCheck(LRecompileCheck *ins);
|
||||
|
||||
private:
|
||||
|
@ -435,6 +441,9 @@ class CodeGenerator : public CodeGeneratorSpecific
|
|||
// place of jumpToBlock.
|
||||
Label *getJumpLabelForBranch(MBasicBlock *block);
|
||||
|
||||
void emitStoreElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index);
|
||||
|
||||
// Bailout if an element about to be written to is a hole.
|
||||
bool emitStoreHoleCheck(Register elements, const LAllocation *index, LSnapshot *snapshot);
|
||||
|
||||
|
|
|
@ -564,14 +564,14 @@ static inline void
|
|||
FinishAllOffThreadCompilations(JSCompartment *comp)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
AutoLockWorkerThreadState lock;
|
||||
GlobalWorkerThreadState::IonBuilderVector &finished = WorkerThreadState().ionFinishedList();
|
||||
AutoLockHelperThreadState lock;
|
||||
GlobalHelperThreadState::IonBuilderVector &finished = HelperThreadState().ionFinishedList();
|
||||
|
||||
for (size_t i = 0; i < finished.length(); i++) {
|
||||
IonBuilder *builder = finished[i];
|
||||
if (builder->compartment == CompileCompartment::get(comp)) {
|
||||
FinishOffThreadBuilder(builder);
|
||||
WorkerThreadState().remove(finished, &i);
|
||||
HelperThreadState().remove(finished, &i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -607,7 +607,7 @@ JitCompartment::mark(JSTracer *trc, JSCompartment *compartment)
|
|||
JSScript *script = e.front();
|
||||
|
||||
// If the script has since been invalidated or was attached by an
|
||||
// off-thread worker too late (i.e., the ForkJoin finished with
|
||||
// off-thread helper too late (i.e., the ForkJoin finished with
|
||||
// warmup doing all the work), remove it.
|
||||
if (!script->hasParallelIonScript() ||
|
||||
!script->parallelIonScript()->isParallelEntryScript())
|
||||
|
@ -1678,9 +1678,9 @@ AttachFinishedCompilations(JSContext *cx)
|
|||
return;
|
||||
|
||||
types::AutoEnterAnalysis enterTypes(cx);
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
GlobalWorkerThreadState::IonBuilderVector &finished = WorkerThreadState().ionFinishedList();
|
||||
GlobalHelperThreadState::IonBuilderVector &finished = HelperThreadState().ionFinishedList();
|
||||
|
||||
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
|
||||
|
||||
|
@ -1694,7 +1694,7 @@ AttachFinishedCompilations(JSContext *cx)
|
|||
IonBuilder *testBuilder = finished[i];
|
||||
if (testBuilder->compartment == CompileCompartment::get(cx->compartment())) {
|
||||
builder = testBuilder;
|
||||
WorkerThreadState().remove(finished, &i);
|
||||
HelperThreadState().remove(finished, &i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1714,9 +1714,9 @@ AttachFinishedCompilations(JSContext *cx)
|
|||
|
||||
bool success;
|
||||
{
|
||||
// Release the worker thread lock and root the compiler for GC.
|
||||
// Release the helper thread lock and root the compiler for GC.
|
||||
AutoTempAllocatorRooter root(cx, &builder->alloc());
|
||||
AutoUnlockWorkerThreadState unlock;
|
||||
AutoUnlockHelperThreadState unlock;
|
||||
success = codegen->link(cx, builder->constraints());
|
||||
}
|
||||
|
||||
|
@ -1751,7 +1751,7 @@ OffThreadCompilationAvailable(JSContext *cx)
|
|||
// CodeGenerator::maybeCreateScriptCounts will not attach script profiles
|
||||
// when running off thread.
|
||||
return cx->runtime()->canUseParallelIonCompilation()
|
||||
&& WorkerThreadState().cpuCount > 1
|
||||
&& HelperThreadState().cpuCount > 1
|
||||
&& cx->runtime()->gc.incrementalState == gc::NO_INCREMENTAL
|
||||
&& !cx->runtime()->profilingScripts;
|
||||
#else
|
||||
|
@ -1805,7 +1805,7 @@ IonCompile(JSContext *cx, JSScript *script,
|
|||
JS_ASSERT(optimizationLevel > Optimization_DontCompile);
|
||||
|
||||
// Make sure the script's canonical function isn't lazy. We can't de-lazify
|
||||
// it in a worker thread.
|
||||
// it in a helper thread.
|
||||
script->ensureNonLazyCanonicalFunction(cx);
|
||||
|
||||
TrackPropertiesForSingletonScopes(cx, script, baselineFrame);
|
||||
|
@ -1981,7 +1981,7 @@ CheckScriptSize(JSContext *cx, JSScript* script)
|
|||
numLocalsAndArgs > MAX_MAIN_THREAD_LOCALS_AND_ARGS)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
size_t cpuCount = WorkerThreadState().cpuCount;
|
||||
size_t cpuCount = HelperThreadState().cpuCount;
|
||||
#else
|
||||
size_t cpuCount = 1;
|
||||
#endif
|
||||
|
|
|
@ -1273,10 +1273,8 @@ jit::BuildPhiReverseMapping(MIRGraph &graph)
|
|||
// break statement is present, the exit block will forward
|
||||
// directly to the break block.
|
||||
for (MBasicBlockIterator block(graph.begin()); block != graph.end(); block++) {
|
||||
if (block->numPredecessors() < 2) {
|
||||
JS_ASSERT(block->phisEmpty());
|
||||
if (block->phisEmpty())
|
||||
continue;
|
||||
}
|
||||
|
||||
// Assert on the above.
|
||||
for (size_t j = 0; j < block->numPredecessors(); j++) {
|
||||
|
@ -1523,13 +1521,7 @@ jit::AssertExtendedGraphCoherency(MIRGraph &graph)
|
|||
successorWithPhis++;
|
||||
|
||||
JS_ASSERT(successorWithPhis <= 1);
|
||||
JS_ASSERT_IF(successorWithPhis, block->successorWithPhis() != nullptr);
|
||||
|
||||
// I'd like to assert this, but it's not necc. true. Sometimes we set this
|
||||
// flag to non-nullptr just because a successor has multiple preds, even if it
|
||||
// does not actually have any phis.
|
||||
//
|
||||
// JS_ASSERT_IF(!successorWithPhis, block->successorWithPhis() == nullptr);
|
||||
JS_ASSERT((successorWithPhis != 0) == (block->successorWithPhis() != nullptr));
|
||||
}
|
||||
|
||||
AssertDominatorTree(graph);
|
||||
|
|
|
@ -3503,24 +3503,6 @@ class LLambdaPar : public LInstructionHelper<1, 2, 2>
|
|||
}
|
||||
};
|
||||
|
||||
// Determines the implicit |this| value for function calls.
|
||||
class LImplicitThis : public LInstructionHelper<BOX_PIECES, 1, 0>
|
||||
{
|
||||
public:
|
||||
LIR_HEADER(ImplicitThis)
|
||||
|
||||
explicit LImplicitThis(const LAllocation &callee) {
|
||||
setOperand(0, callee);
|
||||
}
|
||||
|
||||
const MImplicitThis *mir() const {
|
||||
return mir_->toImplicitThis();
|
||||
}
|
||||
const LAllocation *callee() {
|
||||
return getOperand(0);
|
||||
}
|
||||
};
|
||||
|
||||
// Load the "slots" member out of a JSObject.
|
||||
// Input: JSObject pointer
|
||||
// Output: slots pointer
|
||||
|
@ -4721,8 +4703,14 @@ class LLoadSlotT : public LInstructionHelper<1, 1, 0>
|
|||
public:
|
||||
LIR_HEADER(LoadSlotT)
|
||||
|
||||
explicit LLoadSlotT(const LAllocation &in) {
|
||||
setOperand(0, in);
|
||||
explicit LLoadSlotT(const LAllocation &slots) {
|
||||
setOperand(0, slots);
|
||||
}
|
||||
const LAllocation *slots() {
|
||||
return getOperand(0);
|
||||
}
|
||||
const LDefinition *output() {
|
||||
return this->getDef(0);
|
||||
}
|
||||
const MLoadSlot *mir() const {
|
||||
return mir_->toLoadSlot();
|
||||
|
|
|
@ -163,7 +163,6 @@
|
|||
_(LambdaArrow) \
|
||||
_(LambdaForSingleton) \
|
||||
_(LambdaPar) \
|
||||
_(ImplicitThis) \
|
||||
_(Slots) \
|
||||
_(Elements) \
|
||||
_(ConvertElementsToDoubles) \
|
||||
|
|
|
@ -2097,15 +2097,6 @@ LIRGenerator::visitLambdaPar(MLambdaPar *ins)
|
|||
return define(lir, ins);
|
||||
}
|
||||
|
||||
bool
|
||||
LIRGenerator::visitImplicitThis(MImplicitThis *ins)
|
||||
{
|
||||
JS_ASSERT(ins->callee()->type() == MIRType_Object);
|
||||
|
||||
LImplicitThis *lir = new(alloc()) LImplicitThis(useRegister(ins->callee()));
|
||||
return assignSnapshot(lir) && defineBox(lir, ins);
|
||||
}
|
||||
|
||||
bool
|
||||
LIRGenerator::visitSlots(MSlots *ins)
|
||||
{
|
||||
|
@ -2553,7 +2544,7 @@ LIRGenerator::visitLoadElement(MLoadElement *ins)
|
|||
case MIRType_Value:
|
||||
{
|
||||
LLoadElementV *lir = new(alloc()) LLoadElementV(useRegister(ins->elements()),
|
||||
useRegisterOrConstant(ins->index()));
|
||||
useRegisterOrConstant(ins->index()));
|
||||
if (ins->fallible() && !assignSnapshot(lir))
|
||||
return false;
|
||||
return defineBox(lir, ins);
|
||||
|
@ -2565,7 +2556,7 @@ LIRGenerator::visitLoadElement(MLoadElement *ins)
|
|||
default:
|
||||
{
|
||||
LLoadElementT *lir = new(alloc()) LLoadElementT(useRegister(ins->elements()),
|
||||
useRegisterOrConstant(ins->index()));
|
||||
useRegisterOrConstant(ins->index()));
|
||||
if (ins->fallible() && !assignSnapshot(lir))
|
||||
return false;
|
||||
return define(lir, ins);
|
||||
|
|
|
@ -160,7 +160,6 @@ class LIRGenerator : public LIRGeneratorSpecific
|
|||
bool visitLambda(MLambda *ins);
|
||||
bool visitLambdaArrow(MLambdaArrow *ins);
|
||||
bool visitLambdaPar(MLambdaPar *ins);
|
||||
bool visitImplicitThis(MImplicitThis *ins);
|
||||
bool visitSlots(MSlots *ins);
|
||||
bool visitElements(MElements *ins);
|
||||
bool visitConstantElements(MConstantElements *ins);
|
||||
|
|
|
@ -920,7 +920,6 @@ void
|
|||
MPhi::removeOperand(size_t index)
|
||||
{
|
||||
JS_ASSERT(index < numOperands());
|
||||
JS_ASSERT(numOperands() > 1);
|
||||
JS_ASSERT(getUseFor(index)->index() == index);
|
||||
JS_ASSERT(getUseFor(index)->consumer() == this);
|
||||
|
||||
|
|
|
@ -5544,36 +5544,6 @@ class MLambdaPar
|
|||
}
|
||||
};
|
||||
|
||||
// Determines the implicit |this| value for function calls.
|
||||
class MImplicitThis
|
||||
: public MUnaryInstruction,
|
||||
public SingleObjectPolicy
|
||||
{
|
||||
explicit MImplicitThis(MDefinition *callee)
|
||||
: MUnaryInstruction(callee)
|
||||
{
|
||||
setResultType(MIRType_Value);
|
||||
setMovable();
|
||||
}
|
||||
|
||||
public:
|
||||
INSTRUCTION_HEADER(ImplicitThis)
|
||||
|
||||
static MImplicitThis *New(TempAllocator &alloc, MDefinition *callee) {
|
||||
return new(alloc) MImplicitThis(callee);
|
||||
}
|
||||
|
||||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
MDefinition *callee() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
return AliasSet::None();
|
||||
}
|
||||
};
|
||||
|
||||
// Returns obj->slots.
|
||||
class MSlots
|
||||
: public MUnaryInstruction,
|
||||
|
|
|
@ -109,7 +109,6 @@ namespace jit {
|
|||
_(StringReplace) \
|
||||
_(Lambda) \
|
||||
_(LambdaArrow) \
|
||||
_(ImplicitThis) \
|
||||
_(Slots) \
|
||||
_(Elements) \
|
||||
_(ConstantElements) \
|
||||
|
|
|
@ -198,7 +198,6 @@ class ParallelSafetyVisitor : public MInstructionVisitor
|
|||
UNSAFE_OP(RegExp)
|
||||
CUSTOM_OP(Lambda)
|
||||
UNSAFE_OP(LambdaArrow)
|
||||
UNSAFE_OP(ImplicitThis)
|
||||
SAFE_OP(Slots)
|
||||
SAFE_OP(Elements)
|
||||
SAFE_OP(ConstantElements)
|
||||
|
|
|
@ -1727,132 +1727,6 @@ CodeGeneratorARM::visitNotF(LNotF *ins)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorARM::visitLoadSlotV(LLoadSlotV *load)
|
||||
{
|
||||
const ValueOperand out = ToOutValue(load);
|
||||
Register base = ToRegister(load->input());
|
||||
int32_t offset = load->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
masm.loadValue(Address(base, offset), out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorARM::visitLoadSlotT(LLoadSlotT *load)
|
||||
{
|
||||
Register base = ToRegister(load->input());
|
||||
int32_t offset = load->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
if (load->mir()->type() == MIRType_Double)
|
||||
masm.loadInt32OrDouble(Operand(base, offset), ToFloatRegister(load->output()));
|
||||
else
|
||||
masm.ma_ldr(Operand(base, offset + NUNBOX32_PAYLOAD_OFFSET), ToRegister(load->output()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorARM::visitStoreSlotT(LStoreSlotT *store)
|
||||
{
|
||||
|
||||
Register base = ToRegister(store->slots());
|
||||
int32_t offset = store->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
const LAllocation *value = store->value();
|
||||
MIRType valueType = store->mir()->value()->type();
|
||||
|
||||
if (store->mir()->needsBarrier())
|
||||
emitPreBarrier(Address(base, offset), store->mir()->slotType());
|
||||
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.ma_vstr(ToFloatRegister(value), Operand(base, offset));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != store->mir()->slotType())
|
||||
masm.storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), Operand(base, offset));
|
||||
|
||||
// Store the payload.
|
||||
if (value->isConstant())
|
||||
masm.storePayload(*value->toConstant(), Operand(base, offset));
|
||||
else
|
||||
masm.storePayload(ToRegister(value), Operand(base, offset));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorARM::visitLoadElementT(LLoadElementT *load)
|
||||
{
|
||||
Register base = ToRegister(load->elements());
|
||||
if (load->mir()->type() == MIRType_Double) {
|
||||
FloatRegister fpreg = ToFloatRegister(load->output());
|
||||
if (load->index()->isConstant()) {
|
||||
Address source(base, ToInt32(load->index()) * sizeof(Value));
|
||||
if (load->mir()->loadDoubles())
|
||||
masm.loadDouble(source, fpreg);
|
||||
else
|
||||
masm.loadInt32OrDouble(source, fpreg);
|
||||
} else {
|
||||
Register index = ToRegister(load->index());
|
||||
if (load->mir()->loadDoubles())
|
||||
masm.loadDouble(BaseIndex(base, index, TimesEight), fpreg);
|
||||
else
|
||||
masm.loadInt32OrDouble(base, index, fpreg);
|
||||
}
|
||||
} else {
|
||||
if (load->index()->isConstant()) {
|
||||
Address source(base, ToInt32(load->index()) * sizeof(Value));
|
||||
masm.load32(source, ToRegister(load->output()));
|
||||
} else {
|
||||
masm.ma_ldr(DTRAddr(base, DtrRegImmShift(ToRegister(load->index()), LSL, 3)),
|
||||
ToRegister(load->output()));
|
||||
}
|
||||
}
|
||||
JS_ASSERT(!load->mir()->needsHoleCheck());
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorARM::storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index)
|
||||
{
|
||||
if (index->isConstant()) {
|
||||
Address dest = Address(elements, ToInt32(index) * sizeof(Value));
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.ma_vstr(ToFloatRegister(value), Operand(dest));
|
||||
return;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != elementType)
|
||||
masm.storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), dest);
|
||||
|
||||
// Store the payload.
|
||||
if (value->isConstant())
|
||||
masm.storePayload(*value->toConstant(), dest);
|
||||
else
|
||||
masm.storePayload(ToRegister(value), dest);
|
||||
} else {
|
||||
Register indexReg = ToRegister(index);
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.ma_vstr(ToFloatRegister(value), elements, indexReg);
|
||||
return;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != elementType)
|
||||
masm.storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), elements, indexReg);
|
||||
|
||||
// Store the payload.
|
||||
if (value->isConstant())
|
||||
masm.storePayload(*value->toConstant(), elements, indexReg);
|
||||
else
|
||||
masm.storePayload(ToRegister(value), elements, indexReg);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorARM::visitGuardShape(LGuardShape *guard)
|
||||
{
|
||||
|
@ -1892,40 +1766,6 @@ CodeGeneratorARM::visitGuardClass(LGuardClass *guard)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorARM::visitImplicitThis(LImplicitThis *lir)
|
||||
{
|
||||
Register callee = ToRegister(lir->callee());
|
||||
const ValueOperand out = ToOutValue(lir);
|
||||
|
||||
// The implicit |this| is always |undefined| if the function's environment
|
||||
// is the current global.
|
||||
masm.ma_ldr(DTRAddr(callee, DtrOffImm(JSFunction::offsetOfEnvironment())), out.typeReg());
|
||||
masm.ma_cmp(out.typeReg(), ImmGCPtr(&gen->info().script()->global()));
|
||||
|
||||
// TODO: OOL stub path.
|
||||
if (!bailoutIf(Assembler::NotEqual, lir->snapshot()))
|
||||
return false;
|
||||
|
||||
masm.moveValue(UndefinedValue(), out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorARM::visitInterruptCheck(LInterruptCheck *lir)
|
||||
{
|
||||
OutOfLineCode *ool = oolCallVM(InterruptCheckInfo, lir, (ArgList()), StoreNothing());
|
||||
if (!ool)
|
||||
return false;
|
||||
|
||||
void *interrupt = (void*)GetIonContext()->runtime->addressOfInterrupt();
|
||||
masm.load32(AbsoluteAddress(interrupt), lr);
|
||||
masm.ma_cmp(lr, Imm32(0));
|
||||
masm.ma_b(ool->entry(), Assembler::NonZero);
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorARM::generateInvalidateEpilogue()
|
||||
{
|
||||
|
|
|
@ -164,9 +164,6 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
|||
// Functions for LTestVAndBranch.
|
||||
Register splitTagForTest(const ValueOperand &value);
|
||||
|
||||
void storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index);
|
||||
|
||||
bool divICommon(MDiv *mir, Register lhs, Register rhs, Register output, LSnapshot *snapshot,
|
||||
Label &done);
|
||||
bool modICommon(MMod *mir, Register lhs, Register rhs, Register output, LSnapshot *snapshot,
|
||||
|
@ -183,18 +180,9 @@ class CodeGeneratorARM : public CodeGeneratorShared
|
|||
bool visitDouble(LDouble *ins);
|
||||
bool visitFloat32(LFloat32 *ins);
|
||||
|
||||
bool visitLoadSlotV(LLoadSlotV *load);
|
||||
bool visitLoadSlotT(LLoadSlotT *load);
|
||||
bool visitStoreSlotT(LStoreSlotT *load);
|
||||
|
||||
bool visitLoadElementT(LLoadElementT *load);
|
||||
|
||||
bool visitGuardShape(LGuardShape *guard);
|
||||
bool visitGuardObjectType(LGuardObjectType *guard);
|
||||
bool visitGuardClass(LGuardClass *guard);
|
||||
bool visitImplicitThis(LImplicitThis *lir);
|
||||
|
||||
bool visitInterruptCheck(LInterruptCheck *lir);
|
||||
|
||||
bool visitNegI(LNegI *lir);
|
||||
bool visitNegD(LNegD *lir);
|
||||
|
|
|
@ -3282,6 +3282,35 @@ MacroAssemblerARMCompat::extractTag(const BaseIndex &address, Register scratch)
|
|||
return extractTag(Address(scratch, address.offset), scratch);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
MacroAssemblerARMCompat::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const T &dest,
|
||||
MIRType slotType)
|
||||
{
|
||||
if (valueType == MIRType_Double) {
|
||||
storeDouble(value.reg().typedReg().fpu(), dest);
|
||||
return;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != slotType)
|
||||
storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), dest);
|
||||
|
||||
// Store the payload.
|
||||
if (value.constant())
|
||||
storePayload(value.value(), dest);
|
||||
else
|
||||
storePayload(value.reg().typedReg().gpr(), dest);
|
||||
}
|
||||
|
||||
template void
|
||||
MacroAssemblerARMCompat::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const Address &dest,
|
||||
MIRType slotType);
|
||||
|
||||
template void
|
||||
MacroAssemblerARMCompat::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const BaseIndex &dest,
|
||||
MIRType slotType);
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::moveValue(const Value &val, Register type, Register data)
|
||||
{
|
||||
|
@ -3468,28 +3497,39 @@ MacroAssemblerARMCompat::storePayload(Register src, Operand dest)
|
|||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::storePayload(const Value &val, Register base, Register index, int32_t shift)
|
||||
MacroAssemblerARMCompat::storePayload(const Value &val, const BaseIndex &dest)
|
||||
{
|
||||
unsigned shift = ScaleToShift(dest.scale);
|
||||
MOZ_ASSERT(dest.offset == 0);
|
||||
|
||||
jsval_layout jv = JSVAL_TO_IMPL(val);
|
||||
if (val.isMarkable())
|
||||
ma_mov(ImmGCPtr((gc::Cell *)jv.s.payload.ptr), ScratchRegister);
|
||||
else
|
||||
ma_mov(Imm32(jv.s.payload.i32), ScratchRegister);
|
||||
JS_STATIC_ASSERT(NUNBOX32_PAYLOAD_OFFSET == 0);
|
||||
|
||||
// If NUNBOX32_PAYLOAD_OFFSET is not zero, the memory operand [base + index << shift + imm]
|
||||
// cannot be encoded into a single instruction, and cannot be integrated into the as_dtr call.
|
||||
as_dtr(IsStore, 32, Offset, ScratchRegister, DTRAddr(base, DtrRegImmShift(index, LSL, shift)));
|
||||
JS_STATIC_ASSERT(NUNBOX32_PAYLOAD_OFFSET == 0);
|
||||
|
||||
as_dtr(IsStore, 32, Offset, ScratchRegister,
|
||||
DTRAddr(dest.base, DtrRegImmShift(dest.index, LSL, shift)));
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::storePayload(Register src, Register base, Register index, int32_t shift)
|
||||
MacroAssemblerARMCompat::storePayload(Register src, const BaseIndex &dest)
|
||||
{
|
||||
JS_ASSERT((shift < 32) && (shift >= 0));
|
||||
unsigned shift = ScaleToShift(dest.scale);
|
||||
MOZ_ASSERT(shift < 32 && shift >= 0);
|
||||
MOZ_ASSERT(dest.offset == 0);
|
||||
|
||||
// If NUNBOX32_PAYLOAD_OFFSET is not zero, the memory operand [base + index << shift + imm]
|
||||
// cannot be encoded into a single instruction, and cannot be integrated into the as_dtr call.
|
||||
JS_STATIC_ASSERT(NUNBOX32_PAYLOAD_OFFSET == 0);
|
||||
|
||||
// Technically, shift > -32 can be handle by changing LSL to ASR, but should never come up,
|
||||
// and this is one less code path to get wrong.
|
||||
as_dtr(IsStore, 32, Offset, src, DTRAddr(base, DtrRegImmShift(index, LSL, shift)));
|
||||
as_dtr(IsStore, 32, Offset, src, DTRAddr(dest.base, DtrRegImmShift(dest.index, LSL, shift)));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3505,9 +3545,15 @@ MacroAssemblerARMCompat::storeTypeTag(ImmTag tag, Operand dest) {
|
|||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::storeTypeTag(ImmTag tag, Register base, Register index, int32_t shift) {
|
||||
JS_ASSERT(base != ScratchRegister);
|
||||
JS_ASSERT(index != ScratchRegister);
|
||||
MacroAssemblerARMCompat::storeTypeTag(ImmTag tag, const BaseIndex &dest)
|
||||
{
|
||||
Register base = dest.base;
|
||||
Register index = dest.index;
|
||||
unsigned shift = ScaleToShift(dest.scale);
|
||||
MOZ_ASSERT(dest.offset == 0);
|
||||
MOZ_ASSERT(base != ScratchRegister);
|
||||
MOZ_ASSERT(index != ScratchRegister);
|
||||
|
||||
// A value needs to be store a value int base + index << shift + 4.
|
||||
// Arm cannot handle this in a single operand, so a temp register is required.
|
||||
// However, the scratch register is presently in use to hold the immediate that
|
||||
|
|
|
@ -1091,6 +1091,10 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||
load32(address, dest.gpr());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const T &dest,
|
||||
MIRType slotType);
|
||||
|
||||
void moveValue(const Value &val, const ValueOperand &dest);
|
||||
|
||||
void moveValue(const ValueOperand &src, const ValueOperand &dest) {
|
||||
|
@ -1185,10 +1189,10 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||
}
|
||||
void storePayload(const Value &val, Operand dest);
|
||||
void storePayload(Register src, Operand dest);
|
||||
void storePayload(const Value &val, Register base, Register index, int32_t shift = defaultShift);
|
||||
void storePayload(Register src, Register base, Register index, int32_t shift = defaultShift);
|
||||
void storePayload(const Value &val, const BaseIndex &dest);
|
||||
void storePayload(Register src, const BaseIndex &dest);
|
||||
void storeTypeTag(ImmTag tag, Operand dest);
|
||||
void storeTypeTag(ImmTag tag, Register base, Register index, int32_t shift = defaultShift);
|
||||
void storeTypeTag(ImmTag tag, const BaseIndex &dest);
|
||||
|
||||
void makeFrameDescriptor(Register frameSizeReg, FrameType type) {
|
||||
ma_lsl(Imm32(FRAMESIZE_SHIFT), frameSizeReg, frameSizeReg);
|
||||
|
|
|
@ -1754,132 +1754,6 @@ CodeGeneratorMIPS::visitNotF(LNotF *ins)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorMIPS::visitLoadSlotV(LLoadSlotV *load)
|
||||
{
|
||||
const ValueOperand out = ToOutValue(load);
|
||||
Register base = ToRegister(load->input());
|
||||
int32_t offset = load->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
masm.loadValue(Address(base, offset), out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorMIPS::visitLoadSlotT(LLoadSlotT *load)
|
||||
{
|
||||
Register base = ToRegister(load->input());
|
||||
int32_t offset = load->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
if (load->mir()->type() == MIRType_Double)
|
||||
masm.loadInt32OrDouble(Address(base, offset), ToFloatRegister(load->output()));
|
||||
else
|
||||
masm.load32(Address(base, offset + NUNBOX32_PAYLOAD_OFFSET), ToRegister(load->output()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorMIPS::visitStoreSlotT(LStoreSlotT *store)
|
||||
{
|
||||
Register base = ToRegister(store->slots());
|
||||
int32_t offset = store->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
const LAllocation *value = store->value();
|
||||
MIRType valueType = store->mir()->value()->type();
|
||||
|
||||
if (store->mir()->needsBarrier())
|
||||
emitPreBarrier(Address(base, offset), store->mir()->slotType());
|
||||
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.storeDouble(ToFloatRegister(value), Address(base, offset));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != store->mir()->slotType())
|
||||
masm.storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), Address(base, offset));
|
||||
|
||||
// Store the payload.
|
||||
if (value->isConstant())
|
||||
masm.storePayload(*value->toConstant(), Address(base, offset));
|
||||
else
|
||||
masm.storePayload(ToRegister(value), Address(base, offset));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorMIPS::visitLoadElementT(LLoadElementT *load)
|
||||
{
|
||||
Register base = ToRegister(load->elements());
|
||||
if (load->mir()->type() == MIRType_Double) {
|
||||
FloatRegister fpreg = ToFloatRegister(load->output());
|
||||
if (load->index()->isConstant()) {
|
||||
Address source(base, ToInt32(load->index()) * sizeof(Value));
|
||||
if (load->mir()->loadDoubles())
|
||||
masm.loadDouble(source, fpreg);
|
||||
else
|
||||
masm.loadInt32OrDouble(source, fpreg);
|
||||
} else {
|
||||
Register index = ToRegister(load->index());
|
||||
if (load->mir()->loadDoubles())
|
||||
masm.loadDouble(BaseIndex(base, index, TimesEight), fpreg);
|
||||
else
|
||||
masm.loadInt32OrDouble(base, index, fpreg);
|
||||
}
|
||||
} else {
|
||||
if (load->index()->isConstant()) {
|
||||
Address source(base, ToInt32(load->index()) * sizeof(Value));
|
||||
masm.load32(source, ToRegister(load->output()));
|
||||
} else {
|
||||
BaseIndex source(base, ToRegister(load->index()), TimesEight);
|
||||
masm.load32(source, ToRegister(load->output()));
|
||||
}
|
||||
}
|
||||
MOZ_ASSERT(!load->mir()->needsHoleCheck());
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorMIPS::storeElementTyped(const LAllocation *value, MIRType valueType,
|
||||
MIRType elementType, Register elements,
|
||||
const LAllocation *index)
|
||||
{
|
||||
if (index->isConstant()) {
|
||||
Address dest = Address(elements, ToInt32(index) * sizeof(Value));
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.storeDouble(ToFloatRegister(value), Address(dest.base, dest.offset));
|
||||
return;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != elementType)
|
||||
masm.storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), dest);
|
||||
|
||||
// Store the payload.
|
||||
if (value->isConstant())
|
||||
masm.storePayload(*value->toConstant(), dest);
|
||||
else
|
||||
masm.storePayload(ToRegister(value), dest);
|
||||
} else {
|
||||
Register indexReg = ToRegister(index);
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.storeDouble(ToFloatRegister(value), BaseIndex(elements, indexReg, TimesEight));
|
||||
return;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != elementType)
|
||||
masm.storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), elements, indexReg);
|
||||
|
||||
// Store the payload.
|
||||
if (value->isConstant())
|
||||
masm.storePayload(*value->toConstant(), elements, indexReg);
|
||||
else
|
||||
masm.storePayload(ToRegister(value), elements, indexReg);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorMIPS::visitGuardShape(LGuardShape *guard)
|
||||
{
|
||||
|
@ -1917,39 +1791,6 @@ CodeGeneratorMIPS::visitGuardClass(LGuardClass *guard)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorMIPS::visitImplicitThis(LImplicitThis *lir)
|
||||
{
|
||||
Register callee = ToRegister(lir->callee());
|
||||
const ValueOperand out = ToOutValue(lir);
|
||||
|
||||
// The implicit |this| is always |undefined| if the function's environment
|
||||
// is the current global.
|
||||
masm.loadPtr(Address(callee, JSFunction::offsetOfEnvironment()), out.typeReg());
|
||||
GlobalObject *global = &gen->info().script()->global();
|
||||
|
||||
// TODO: OOL stub path.
|
||||
if (!bailoutCmpPtr(Assembler::NotEqual, out.typeReg(), ImmGCPtr(global), lir->snapshot()))
|
||||
return false;
|
||||
|
||||
masm.moveValue(UndefinedValue(), out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorMIPS::visitInterruptCheck(LInterruptCheck *lir)
|
||||
{
|
||||
OutOfLineCode *ool = oolCallVM(InterruptCheckInfo, lir, (ArgList()), StoreNothing());
|
||||
if (!ool)
|
||||
return false;
|
||||
|
||||
masm.branch32(Assembler::NotEqual,
|
||||
AbsoluteAddress(GetIonContext()->runtime->addressOfInterrupt()), Imm32(0),
|
||||
ool->entry());
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorMIPS::generateInvalidateEpilogue()
|
||||
{
|
||||
|
|
|
@ -229,9 +229,6 @@ class CodeGeneratorMIPS : public CodeGeneratorShared
|
|||
// Functions for LTestVAndBranch.
|
||||
Register splitTagForTest(const ValueOperand &value);
|
||||
|
||||
void storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index);
|
||||
|
||||
public:
|
||||
CodeGeneratorMIPS(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
|
||||
|
||||
|
@ -243,18 +240,9 @@ class CodeGeneratorMIPS : public CodeGeneratorShared
|
|||
bool visitDouble(LDouble *ins);
|
||||
bool visitFloat32(LFloat32 *ins);
|
||||
|
||||
bool visitLoadSlotV(LLoadSlotV *load);
|
||||
bool visitLoadSlotT(LLoadSlotT *load);
|
||||
bool visitStoreSlotT(LStoreSlotT *load);
|
||||
|
||||
bool visitLoadElementT(LLoadElementT *load);
|
||||
|
||||
bool visitGuardShape(LGuardShape *guard);
|
||||
bool visitGuardObjectType(LGuardObjectType *guard);
|
||||
bool visitGuardClass(LGuardClass *guard);
|
||||
bool visitImplicitThis(LImplicitThis *lir);
|
||||
|
||||
bool visitInterruptCheck(LInterruptCheck *lir);
|
||||
|
||||
bool visitNegI(LNegI *lir);
|
||||
bool visitNegD(LNegD *lir);
|
||||
|
|
|
@ -945,9 +945,6 @@ CodeGeneratorShared::callTraceLIR(uint32_t blockIndex, LInstruction *lir,
|
|||
return true;
|
||||
}
|
||||
|
||||
typedef bool (*InterruptCheckFn)(JSContext *);
|
||||
const VMFunction InterruptCheckInfo = FunctionInfo<InterruptCheckFn>(InterruptCheck);
|
||||
|
||||
Label *
|
||||
CodeGeneratorShared::labelForBackedgeWithImplicitCheck(MBasicBlock *mir)
|
||||
{
|
||||
|
|
|
@ -812,8 +812,6 @@ class OutOfLinePropagateAbortPar : public OutOfLineCode
|
|||
bool generate(CodeGeneratorShared *codegen);
|
||||
};
|
||||
|
||||
extern const VMFunction InterruptCheckInfo;
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
||||
|
|
|
@ -2016,14 +2016,6 @@ CodeGeneratorX86Shared::visitEffectiveAddress(LEffectiveAddress *ins)
|
|||
return true;
|
||||
}
|
||||
|
||||
Operand
|
||||
CodeGeneratorX86Shared::createArrayElementOperand(Register elements, const LAllocation *index)
|
||||
{
|
||||
if (index->isConstant())
|
||||
return Operand(elements, ToInt32(index) * sizeof(js::Value));
|
||||
|
||||
return Operand(elements, ToRegister(index), TimesEight);
|
||||
}
|
||||
bool
|
||||
CodeGeneratorX86Shared::generateInvalidateEpilogue()
|
||||
{
|
||||
|
|
|
@ -97,8 +97,6 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared
|
|||
bool generateEpilogue();
|
||||
bool generateOutOfLineCode();
|
||||
|
||||
Operand createArrayElementOperand(Register elements, const LAllocation *index);
|
||||
|
||||
void emitCompare(MCompare::CompareType type, const LAllocation *left, const LAllocation *right);
|
||||
|
||||
// Emits a branch that directs control flow to the true block if |cond| is
|
||||
|
|
|
@ -133,160 +133,6 @@ CodeGeneratorX64::visitUnbox(LUnbox *unbox)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX64::visitLoadSlotV(LLoadSlotV *load)
|
||||
{
|
||||
ValueOperand dest = ToOutValue(load);
|
||||
Register base = ToRegister(load->input());
|
||||
int32_t offset = load->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
masm.loadValue(Address(base, offset), dest);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorX64::loadUnboxedValue(Operand source, MIRType type, const LDefinition *dest)
|
||||
{
|
||||
switch (type) {
|
||||
case MIRType_Double:
|
||||
masm.loadInt32OrDouble(source, ToFloatRegister(dest));
|
||||
break;
|
||||
|
||||
case MIRType_Object:
|
||||
case MIRType_String:
|
||||
masm.unboxObject(source, ToRegister(dest));
|
||||
break;
|
||||
|
||||
case MIRType_Int32:
|
||||
case MIRType_Boolean:
|
||||
masm.movl(source, ToRegister(dest));
|
||||
break;
|
||||
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected type");
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX64::visitLoadSlotT(LLoadSlotT *load)
|
||||
{
|
||||
Register base = ToRegister(load->input());
|
||||
int32_t offset = load->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
loadUnboxedValue(Operand(base, offset), load->mir()->type(), load->output());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorX64::storeUnboxedValue(const LAllocation *value, MIRType valueType,
|
||||
Operand dest, MIRType slotType)
|
||||
{
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.storeDouble(ToFloatRegister(value), dest);
|
||||
return;
|
||||
}
|
||||
|
||||
// For known integers and booleans, we can just store the unboxed value if
|
||||
// the slot has the same type.
|
||||
if ((valueType == MIRType_Int32 || valueType == MIRType_Boolean) && slotType == valueType) {
|
||||
if (value->isConstant()) {
|
||||
Value val = *value->toConstant();
|
||||
if (valueType == MIRType_Int32)
|
||||
masm.movl(Imm32(val.toInt32()), dest);
|
||||
else
|
||||
masm.movl(Imm32(val.toBoolean() ? 1 : 0), dest);
|
||||
} else {
|
||||
masm.movl(ToRegister(value), dest);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (value->isConstant()) {
|
||||
masm.moveValue(*value->toConstant(), ScratchReg);
|
||||
masm.movq(ScratchReg, dest);
|
||||
} else {
|
||||
masm.storeValue(ValueTypeFromMIRType(valueType), ToRegister(value), dest);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX64::visitStoreSlotT(LStoreSlotT *store)
|
||||
{
|
||||
Register base = ToRegister(store->slots());
|
||||
int32_t offset = store->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
const LAllocation *value = store->value();
|
||||
MIRType valueType = store->mir()->value()->type();
|
||||
MIRType slotType = store->mir()->slotType();
|
||||
|
||||
if (store->mir()->needsBarrier())
|
||||
emitPreBarrier(Address(base, offset), slotType);
|
||||
|
||||
storeUnboxedValue(value, valueType, Operand(base, offset), slotType);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX64::visitLoadElementT(LLoadElementT *load)
|
||||
{
|
||||
Operand source = createArrayElementOperand(ToRegister(load->elements()), load->index());
|
||||
|
||||
if (load->mir()->loadDoubles()) {
|
||||
FloatRegister fpreg = ToFloatRegister(load->output());
|
||||
if (source.kind() == Operand::MEM_REG_DISP)
|
||||
masm.loadDouble(source.toAddress(), fpreg);
|
||||
else
|
||||
masm.loadDouble(source.toBaseIndex(), fpreg);
|
||||
} else {
|
||||
loadUnboxedValue(source, load->mir()->type(), load->output());
|
||||
}
|
||||
|
||||
JS_ASSERT(!load->mir()->needsHoleCheck());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CodeGeneratorX64::storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index)
|
||||
{
|
||||
Operand dest = createArrayElementOperand(elements, index);
|
||||
storeUnboxedValue(value, valueType, dest, elementType);
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX64::visitImplicitThis(LImplicitThis *lir)
|
||||
{
|
||||
Register callee = ToRegister(lir->callee());
|
||||
|
||||
// The implicit |this| is always |undefined| if the function's environment
|
||||
// is the current global.
|
||||
GlobalObject *global = &gen->info().script()->global();
|
||||
masm.cmpPtr(Operand(callee, JSFunction::offsetOfEnvironment()), ImmGCPtr(global));
|
||||
|
||||
// TODO: OOL stub path.
|
||||
if (!bailoutIf(Assembler::NotEqual, lir->snapshot()))
|
||||
return false;
|
||||
|
||||
masm.moveValue(UndefinedValue(), ToOutValue(lir));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX64::visitInterruptCheck(LInterruptCheck *lir)
|
||||
{
|
||||
OutOfLineCode *ool = oolCallVM(InterruptCheckInfo, lir, (ArgList()), StoreNothing());
|
||||
if (!ool)
|
||||
return false;
|
||||
|
||||
masm.branch32(Assembler::NotEqual,
|
||||
AbsoluteAddress(GetIonContext()->runtime->addressOfInterrupt()), Imm32(0),
|
||||
ool->entry());
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX64::visitCompareB(LCompareB *lir)
|
||||
{
|
||||
|
|
|
@ -23,14 +23,9 @@ class CodeGeneratorX64 : public CodeGeneratorX86Shared
|
|||
ValueOperand ToOutValue(LInstruction *ins);
|
||||
ValueOperand ToTempValue(LInstruction *ins, size_t pos);
|
||||
|
||||
|
||||
void loadUnboxedValue(Operand source, MIRType type, const LDefinition *dest);
|
||||
void storeUnboxedValue(const LAllocation *value, MIRType valueType,
|
||||
Operand dest, MIRType slotType);
|
||||
|
||||
void storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index);
|
||||
|
||||
public:
|
||||
CodeGeneratorX64(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
|
||||
|
||||
|
@ -38,12 +33,6 @@ class CodeGeneratorX64 : public CodeGeneratorX86Shared
|
|||
bool visitValue(LValue *value);
|
||||
bool visitBox(LBox *box);
|
||||
bool visitUnbox(LUnbox *unbox);
|
||||
bool visitLoadSlotV(LLoadSlotV *ins);
|
||||
bool visitLoadSlotT(LLoadSlotT *load);
|
||||
bool visitStoreSlotT(LStoreSlotT *store);
|
||||
bool visitLoadElementT(LLoadElementT *load);
|
||||
bool visitImplicitThis(LImplicitThis *lir);
|
||||
bool visitInterruptCheck(LInterruptCheck *lir);
|
||||
bool visitCompareB(LCompareB *lir);
|
||||
bool visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
bool visitCompareV(LCompareV *lir);
|
||||
|
|
|
@ -367,6 +367,45 @@ MacroAssemblerX64::handleFailureWithHandlerTail()
|
|||
jmp(Operand(rsp, offsetof(ResumeFromException, target)));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
MacroAssemblerX64::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const T &dest,
|
||||
MIRType slotType)
|
||||
{
|
||||
if (valueType == MIRType_Double) {
|
||||
storeDouble(value.reg().typedReg().fpu(), dest);
|
||||
return;
|
||||
}
|
||||
|
||||
// For known integers and booleans, we can just store the unboxed value if
|
||||
// the slot has the same type.
|
||||
if ((valueType == MIRType_Int32 || valueType == MIRType_Boolean) && slotType == valueType) {
|
||||
if (value.constant()) {
|
||||
Value val = value.value();
|
||||
if (valueType == MIRType_Int32)
|
||||
store32(Imm32(val.toInt32()), dest);
|
||||
else
|
||||
store32(Imm32(val.toBoolean() ? 1 : 0), dest);
|
||||
} else {
|
||||
store32(value.reg().typedReg().gpr(), dest);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (value.constant())
|
||||
storeValue(value.value(), dest);
|
||||
else
|
||||
storeValue(ValueTypeFromMIRType(valueType), value.reg().typedReg().gpr(), dest);
|
||||
}
|
||||
|
||||
template void
|
||||
MacroAssemblerX64::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const Address &dest,
|
||||
MIRType slotType);
|
||||
|
||||
template void
|
||||
MacroAssemblerX64::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const BaseIndex &dest,
|
||||
MIRType slotType);
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
|
||||
void
|
||||
|
|
|
@ -1237,6 +1237,9 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
|
|||
unboxNonDouble(Operand(src), dest.gpr());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const T &dest, MIRType slotType);
|
||||
|
||||
void loadInstructionPointerAfterCall(Register dest) {
|
||||
loadPtr(Address(StackPointer, 0x0), dest);
|
||||
}
|
||||
|
|
|
@ -137,142 +137,6 @@ CodeGeneratorX86::visitUnbox(LUnbox *unbox)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX86::visitLoadSlotV(LLoadSlotV *load)
|
||||
{
|
||||
const ValueOperand out = ToOutValue(load);
|
||||
Register base = ToRegister(load->input());
|
||||
int32_t offset = load->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
masm.loadValue(Address(base, offset), out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX86::visitLoadSlotT(LLoadSlotT *load)
|
||||
{
|
||||
Register base = ToRegister(load->input());
|
||||
int32_t offset = load->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
if (load->mir()->type() == MIRType_Double)
|
||||
masm.loadInt32OrDouble(Operand(base, offset), ToFloatRegister(load->output()));
|
||||
else
|
||||
masm.load32(Address(base, offset + NUNBOX32_PAYLOAD_OFFSET), ToRegister(load->output()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX86::visitStoreSlotT(LStoreSlotT *store)
|
||||
{
|
||||
Register base = ToRegister(store->slots());
|
||||
int32_t offset = store->mir()->slot() * sizeof(js::Value);
|
||||
|
||||
const LAllocation *value = store->value();
|
||||
MIRType valueType = store->mir()->value()->type();
|
||||
|
||||
if (store->mir()->needsBarrier())
|
||||
emitPreBarrier(Address(base, offset), store->mir()->slotType());
|
||||
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.storeDouble(ToFloatRegister(value), Operand(base, offset));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != store->mir()->slotType())
|
||||
masm.storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), Operand(base, offset));
|
||||
|
||||
// Store the payload.
|
||||
if (value->isConstant())
|
||||
masm.storePayload(*value->toConstant(), Operand(base, offset));
|
||||
else
|
||||
masm.storePayload(ToRegister(value), Operand(base, offset));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX86::visitLoadElementT(LLoadElementT *load)
|
||||
{
|
||||
Operand source = createArrayElementOperand(ToRegister(load->elements()), load->index());
|
||||
|
||||
if (load->mir()->needsHoleCheck()) {
|
||||
Assembler::Condition cond = masm.testMagic(Assembler::Equal, source);
|
||||
if (!bailoutIf(cond, load->snapshot()))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (load->mir()->type() == MIRType_Double) {
|
||||
FloatRegister fpreg = ToFloatRegister(load->output());
|
||||
if (load->mir()->loadDoubles()) {
|
||||
if (source.kind() == Operand::MEM_REG_DISP)
|
||||
masm.loadDouble(source.toAddress(), fpreg);
|
||||
else
|
||||
masm.loadDouble(source.toBaseIndex(), fpreg);
|
||||
} else {
|
||||
masm.loadInt32OrDouble(source, fpreg);
|
||||
}
|
||||
} else {
|
||||
masm.movl(masm.ToPayload(source), ToRegister(load->output()));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CodeGeneratorX86::storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index)
|
||||
{
|
||||
Operand dest = createArrayElementOperand(elements, index);
|
||||
|
||||
if (valueType == MIRType_Double) {
|
||||
masm.storeDouble(ToFloatRegister(value), dest);
|
||||
return;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != elementType)
|
||||
masm.storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), dest);
|
||||
|
||||
// Store the payload.
|
||||
if (value->isConstant())
|
||||
masm.storePayload(*value->toConstant(), dest);
|
||||
else
|
||||
masm.storePayload(ToRegister(value), dest);
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX86::visitImplicitThis(LImplicitThis *lir)
|
||||
{
|
||||
Register callee = ToRegister(lir->callee());
|
||||
const ValueOperand out = ToOutValue(lir);
|
||||
|
||||
// The implicit |this| is always |undefined| if the function's environment
|
||||
// is the current global.
|
||||
GlobalObject *global = &gen->info().script()->global();
|
||||
masm.cmpPtr(Operand(callee, JSFunction::offsetOfEnvironment()), ImmGCPtr(global));
|
||||
|
||||
// TODO: OOL stub path.
|
||||
if (!bailoutIf(Assembler::NotEqual, lir->snapshot()))
|
||||
return false;
|
||||
|
||||
masm.moveValue(UndefinedValue(), out);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX86::visitInterruptCheck(LInterruptCheck *lir)
|
||||
{
|
||||
OutOfLineCode *ool = oolCallVM(InterruptCheckInfo, lir, (ArgList()), StoreNothing());
|
||||
if (!ool)
|
||||
return false;
|
||||
|
||||
masm.cmpl(Operand(AbsoluteAddress(GetIonContext()->runtime->addressOfInterrupt())), Imm32(0));
|
||||
masm.j(Assembler::NonZero, ool->entry());
|
||||
masm.bind(ool->rejoin());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CodeGeneratorX86::visitCompareB(LCompareB *lir)
|
||||
{
|
||||
|
|
|
@ -41,9 +41,6 @@ class CodeGeneratorX86 : public CodeGeneratorX86Shared
|
|||
template<typename T>
|
||||
void storeViewTypeElement(ArrayBufferView::ViewType vt, const LAllocation *value,
|
||||
const T &dstAddr);
|
||||
void storeElementTyped(const LAllocation *value, MIRType valueType, MIRType elementType,
|
||||
Register elements, const LAllocation *index);
|
||||
|
||||
public:
|
||||
CodeGeneratorX86(MIRGenerator *gen, LIRGraph *graph, MacroAssembler *masm);
|
||||
|
||||
|
@ -52,12 +49,6 @@ class CodeGeneratorX86 : public CodeGeneratorX86Shared
|
|||
bool visitBoxFloatingPoint(LBoxFloatingPoint *box);
|
||||
bool visitUnbox(LUnbox *unbox);
|
||||
bool visitValue(LValue *value);
|
||||
bool visitLoadSlotV(LLoadSlotV *load);
|
||||
bool visitLoadSlotT(LLoadSlotT *load);
|
||||
bool visitStoreSlotT(LStoreSlotT *store);
|
||||
bool visitLoadElementT(LLoadElementT *load);
|
||||
bool visitImplicitThis(LImplicitThis *lir);
|
||||
bool visitInterruptCheck(LInterruptCheck *lir);
|
||||
bool visitCompareB(LCompareB *lir);
|
||||
bool visitCompareBAndBranch(LCompareBAndBranch *lir);
|
||||
bool visitCompareV(LCompareV *lir);
|
||||
|
|
|
@ -387,6 +387,35 @@ MacroAssemblerX86::branchTestValue(Condition cond, const ValueOperand &value, co
|
|||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
MacroAssemblerX86::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const T &dest,
|
||||
MIRType slotType)
|
||||
{
|
||||
if (valueType == MIRType_Double) {
|
||||
storeDouble(value.reg().typedReg().fpu(), dest);
|
||||
return;
|
||||
}
|
||||
|
||||
// Store the type tag if needed.
|
||||
if (valueType != slotType)
|
||||
storeTypeTag(ImmType(ValueTypeFromMIRType(valueType)), Operand(dest));
|
||||
|
||||
// Store the payload.
|
||||
if (value.constant())
|
||||
storePayload(value.value(), Operand(dest));
|
||||
else
|
||||
storePayload(value.reg().typedReg().gpr(), Operand(dest));
|
||||
}
|
||||
|
||||
template void
|
||||
MacroAssemblerX86::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const Address &dest,
|
||||
MIRType slotType);
|
||||
|
||||
template void
|
||||
MacroAssemblerX86::storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const BaseIndex &dest,
|
||||
MIRType slotType);
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
|
||||
void
|
||||
|
|
|
@ -978,6 +978,10 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
|
|||
movl(Operand(src), dest.gpr());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void storeUnboxedValue(ConstantOrRegister value, MIRType valueType, const T &dest,
|
||||
MIRType slotType);
|
||||
|
||||
void rshiftPtr(Imm32 imm, Register dest) {
|
||||
shrl(imm, dest);
|
||||
}
|
||||
|
|
|
@ -610,7 +610,7 @@ JS_ShutDown(void)
|
|||
#endif
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
WorkerThreadState().finish();
|
||||
HelperThreadState().finish();
|
||||
#endif
|
||||
|
||||
PRMJ_NowShutdown();
|
||||
|
@ -4732,7 +4732,7 @@ JS::FinishOffThreadScript(JSContext *maybecx, JSRuntime *rt, void *token)
|
|||
if (maybecx)
|
||||
lfc.construct(maybecx);
|
||||
|
||||
return WorkerThreadState().finishParseTask(maybecx, rt, token);
|
||||
return HelperThreadState().finishParseTask(maybecx, rt, token);
|
||||
#else
|
||||
MOZ_ASSUME_UNREACHABLE("Off thread compilation is not available.");
|
||||
#endif
|
||||
|
|
|
@ -298,7 +298,7 @@ struct ThreadSafeContext : ContextFriendFields,
|
|||
}
|
||||
};
|
||||
|
||||
struct WorkerThread;
|
||||
struct HelperThread;
|
||||
|
||||
class ExclusiveContext : public ThreadSafeContext
|
||||
{
|
||||
|
@ -309,14 +309,14 @@ class ExclusiveContext : public ThreadSafeContext
|
|||
friend void JSScript::initCompartment(ExclusiveContext *cx);
|
||||
friend class jit::IonContext;
|
||||
|
||||
// The worker on which this context is running, if this is not a JSContext.
|
||||
WorkerThread *workerThread_;
|
||||
// The thread on which this context is running, if this is not a JSContext.
|
||||
HelperThread *helperThread_;
|
||||
|
||||
public:
|
||||
|
||||
ExclusiveContext(JSRuntime *rt, PerThreadData *pt, ContextKind kind)
|
||||
: ThreadSafeContext(rt, pt, kind),
|
||||
workerThread_(nullptr),
|
||||
helperThread_(nullptr),
|
||||
enterCompartmentDepth_(0)
|
||||
{}
|
||||
|
||||
|
@ -352,8 +352,8 @@ class ExclusiveContext : public ThreadSafeContext
|
|||
inline void enterNullCompartment();
|
||||
inline void leaveCompartment(JSCompartment *oldCompartment);
|
||||
|
||||
void setWorkerThread(WorkerThread *workerThread);
|
||||
WorkerThread *workerThread() const { return workerThread_; }
|
||||
void setHelperThread(HelperThread *helperThread);
|
||||
HelperThread *helperThread() const { return helperThread_; }
|
||||
|
||||
// Threads with an ExclusiveContext may freely access any data in their
|
||||
// compartment and zone.
|
||||
|
@ -391,7 +391,7 @@ class ExclusiveContext : public ThreadSafeContext
|
|||
return runtime_->scriptDataTable();
|
||||
}
|
||||
|
||||
// Methods specific to any WorkerThread for the context.
|
||||
// Methods specific to any HelperThread for the context.
|
||||
frontend::CompileError &addPendingCompileError();
|
||||
void addPendingOverRecursed();
|
||||
};
|
||||
|
|
|
@ -984,7 +984,7 @@ class js::gc::AutoMaybeStartBackgroundAllocation
|
|||
|
||||
~AutoMaybeStartBackgroundAllocation() {
|
||||
if (runtime && !runtime->currentThreadOwnsInterruptLock()) {
|
||||
AutoLockWorkerThreadState workerLock;
|
||||
AutoLockHelperThreadState helperLock;
|
||||
AutoLockGC lock(runtime);
|
||||
runtime->gc.startBackgroundAllocationIfIdle();
|
||||
}
|
||||
|
@ -1921,16 +1921,16 @@ ArenaLists::refillFreeList(ThreadSafeContext *cx, AllocKind thingKind)
|
|||
/*
|
||||
* If we're off the main thread, we try to allocate once and
|
||||
* return whatever value we get. If we aren't in a ForkJoin
|
||||
* session (i.e. we are in a worker thread async with the main
|
||||
* session (i.e. we are in a helper thread async with the main
|
||||
* thread), we need to first ensure the main thread is not in a GC
|
||||
* session.
|
||||
*/
|
||||
mozilla::Maybe<AutoLockWorkerThreadState> lock;
|
||||
mozilla::Maybe<AutoLockHelperThreadState> lock;
|
||||
JSRuntime *rt = zone->runtimeFromAnyThread();
|
||||
if (rt->exclusiveThreadsPresent()) {
|
||||
lock.construct();
|
||||
while (rt->isHeapBusy())
|
||||
WorkerThreadState().wait(GlobalWorkerThreadState::PRODUCER);
|
||||
HelperThreadState().wait(GlobalHelperThreadState::PRODUCER);
|
||||
}
|
||||
|
||||
void *thing = cx->allocator()->arenas.allocateFromArenaInline(zone, thingKind,
|
||||
|
@ -2354,7 +2354,7 @@ GCHelperState::init()
|
|||
|
||||
backgroundAllocation = (GetCPUCount() >= 2);
|
||||
|
||||
WorkerThreadState().ensureInitialized();
|
||||
HelperThreadState().ensureInitialized();
|
||||
#else
|
||||
backgroundAllocation = false;
|
||||
#endif /* JS_THREADSAFE */
|
||||
|
@ -2402,9 +2402,9 @@ GCHelperState::startBackgroundThread(State newState)
|
|||
JS_ASSERT(!thread && state() == IDLE && newState != IDLE);
|
||||
setState(newState);
|
||||
|
||||
if (!WorkerThreadState().gcHelperWorklist().append(this))
|
||||
if (!HelperThreadState().gcHelperWorklist().append(this))
|
||||
CrashAtUnhandlableOOM("Could not add to pending GC helpers list");
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::PRODUCER);
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::PRODUCER);
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
|
@ -2493,7 +2493,7 @@ void
|
|||
GCHelperState::startBackgroundSweep(bool shouldShrink)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
AutoLockWorkerThreadState workerLock;
|
||||
AutoLockHelperThreadState helperLock;
|
||||
AutoLockGC lock(rt);
|
||||
JS_ASSERT(state() == IDLE);
|
||||
JS_ASSERT(!sweepFlag);
|
||||
|
@ -4268,10 +4268,10 @@ AutoTraceSession::AutoTraceSession(JSRuntime *rt, js::HeapState heapState)
|
|||
JS_ASSERT(rt->currentThreadHasExclusiveAccess());
|
||||
|
||||
if (rt->exclusiveThreadsPresent()) {
|
||||
// Lock the worker thread state when changing the heap state in the
|
||||
// Lock the helper thread state when changing the heap state in the
|
||||
// presence of exclusive threads, to avoid racing with refillFreeList.
|
||||
#ifdef JS_THREADSAFE
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
rt->gc.heapState = heapState;
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
|
@ -4287,11 +4287,11 @@ AutoTraceSession::~AutoTraceSession()
|
|||
|
||||
if (runtime->exclusiveThreadsPresent()) {
|
||||
#ifdef JS_THREADSAFE
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
runtime->gc.heapState = prevState;
|
||||
|
||||
// Notify any worker threads waiting for the trace session to end.
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::PRODUCER);
|
||||
// Notify any helper threads waiting for the trace session to end.
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::PRODUCER);
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
|
@ -4968,7 +4968,7 @@ js::PrepareForDebugGC(JSRuntime *rt)
|
|||
JS_FRIEND_API(void)
|
||||
JS::ShrinkGCBuffers(JSRuntime *rt)
|
||||
{
|
||||
AutoLockWorkerThreadState workerLock;
|
||||
AutoLockHelperThreadState helperLock;
|
||||
AutoLockGC lock(rt);
|
||||
JS_ASSERT(!rt->isHeapBusy());
|
||||
|
||||
|
|
|
@ -1611,19 +1611,19 @@ ScriptSource::setSourceCopy(ExclusiveContext *cx, SourceBufferHolder &srcBuf,
|
|||
// in Parser::stringLiteral).
|
||||
//
|
||||
// Lastly, since the parsing thread will eventually perform a blocking wait
|
||||
// on the compresion task's worker thread, require that there are at least 2
|
||||
// worker threads:
|
||||
// - If we are on a worker thread, there must be another worker thread to
|
||||
// on the compression task's thread, require that there are at least 2
|
||||
// helper threads:
|
||||
// - If we are on a helper thread, there must be another helper thread to
|
||||
// execute our compression task.
|
||||
// - If we are on the main thread, there must be at least two worker
|
||||
// threads since at most one worker thread can be blocking on the main
|
||||
// thread (see WorkerThreadState::canStartParseTask) which would cause a
|
||||
// deadlock if there wasn't a second worker thread that could make
|
||||
// - If we are on the main thread, there must be at least two helper
|
||||
// threads since at most one helper thread can be blocking on the main
|
||||
// thread (see HelperThreadState::canStartParseTask) which would cause a
|
||||
// deadlock if there wasn't a second helper thread that could make
|
||||
// progress on our compression task.
|
||||
#if defined(JS_THREADSAFE) && defined(USE_ZLIB)
|
||||
bool canCompressOffThread =
|
||||
WorkerThreadState().cpuCount > 1 &&
|
||||
WorkerThreadState().threadCount >= 2;
|
||||
HelperThreadState().cpuCount > 1 &&
|
||||
HelperThreadState().threadCount >= 2;
|
||||
#else
|
||||
bool canCompressOffThread = false;
|
||||
#endif
|
||||
|
|
|
@ -30,19 +30,19 @@ using mozilla::DebugOnly;
|
|||
|
||||
namespace js {
|
||||
|
||||
GlobalWorkerThreadState gWorkerThreadState;
|
||||
GlobalHelperThreadState gHelperThreadState;
|
||||
|
||||
} // namespace js
|
||||
|
||||
void
|
||||
js::EnsureWorkerThreadsInitialized(ExclusiveContext *cx)
|
||||
js::EnsureHelperThreadsInitialized(ExclusiveContext *cx)
|
||||
{
|
||||
// If 'cx' is not a JSContext, we are already off the main thread and the
|
||||
// worker threads would have already been initialized.
|
||||
// helper threads would have already been initialized.
|
||||
if (!cx->isJSContext())
|
||||
return;
|
||||
|
||||
WorkerThreadState().ensureInitialized();
|
||||
HelperThreadState().ensureInitialized();
|
||||
}
|
||||
|
||||
static size_t
|
||||
|
@ -55,10 +55,10 @@ void
|
|||
js::SetFakeCPUCount(size_t count)
|
||||
{
|
||||
// This must be called before the threads have been initialized.
|
||||
JS_ASSERT(!WorkerThreadState().threads);
|
||||
JS_ASSERT(!HelperThreadState().threads);
|
||||
|
||||
WorkerThreadState().cpuCount = count;
|
||||
WorkerThreadState().threadCount = ThreadCountForCPUCount(count);
|
||||
HelperThreadState().cpuCount = count;
|
||||
HelperThreadState().threadCount = ThreadCountForCPUCount(count);
|
||||
}
|
||||
|
||||
#ifdef JS_ION
|
||||
|
@ -70,30 +70,30 @@ js::StartOffThreadAsmJSCompile(ExclusiveContext *cx, AsmJSParallelTask *asmData)
|
|||
JS_ASSERT(asmData->mir);
|
||||
JS_ASSERT(asmData->lir == nullptr);
|
||||
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
// Don't append this task if another failed.
|
||||
if (WorkerThreadState().asmJSWorkerFailed())
|
||||
if (HelperThreadState().asmJSFailed())
|
||||
return false;
|
||||
|
||||
if (!WorkerThreadState().asmJSWorklist().append(asmData))
|
||||
if (!HelperThreadState().asmJSWorklist().append(asmData))
|
||||
return false;
|
||||
|
||||
WorkerThreadState().notifyOne(GlobalWorkerThreadState::PRODUCER);
|
||||
HelperThreadState().notifyOne(GlobalHelperThreadState::PRODUCER);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
js::StartOffThreadIonCompile(JSContext *cx, jit::IonBuilder *builder)
|
||||
{
|
||||
EnsureWorkerThreadsInitialized(cx);
|
||||
EnsureHelperThreadsInitialized(cx);
|
||||
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
if (!WorkerThreadState().ionWorklist().append(builder))
|
||||
if (!HelperThreadState().ionWorklist().append(builder))
|
||||
return false;
|
||||
|
||||
WorkerThreadState().notifyOne(GlobalWorkerThreadState::PRODUCER);
|
||||
HelperThreadState().notifyOne(GlobalHelperThreadState::PRODUCER);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ js::StartOffThreadIonCompile(JSContext *cx, jit::IonBuilder *builder)
|
|||
static void
|
||||
FinishOffThreadIonCompile(jit::IonBuilder *builder)
|
||||
{
|
||||
WorkerThreadState().ionFinishedList().append(builder);
|
||||
HelperThreadState().ionFinishedList().append(builder);
|
||||
}
|
||||
|
||||
#endif // JS_ION
|
||||
|
@ -126,46 +126,46 @@ js::CancelOffThreadIonCompile(JSCompartment *compartment, JSScript *script)
|
|||
if (!jitComp)
|
||||
return;
|
||||
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
if (!WorkerThreadState().threads)
|
||||
if (!HelperThreadState().threads)
|
||||
return;
|
||||
|
||||
/* Cancel any pending entries for which processing hasn't started. */
|
||||
GlobalWorkerThreadState::IonBuilderVector &worklist = WorkerThreadState().ionWorklist();
|
||||
GlobalHelperThreadState::IonBuilderVector &worklist = HelperThreadState().ionWorklist();
|
||||
for (size_t i = 0; i < worklist.length(); i++) {
|
||||
jit::IonBuilder *builder = worklist[i];
|
||||
if (CompiledScriptMatches(compartment, script, builder->script())) {
|
||||
FinishOffThreadIonCompile(builder);
|
||||
WorkerThreadState().remove(worklist, &i);
|
||||
HelperThreadState().remove(worklist, &i);
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for in progress entries to finish up. */
|
||||
for (size_t i = 0; i < WorkerThreadState().threadCount; i++) {
|
||||
const WorkerThread &helper = WorkerThreadState().threads[i];
|
||||
for (size_t i = 0; i < HelperThreadState().threadCount; i++) {
|
||||
const HelperThread &helper = HelperThreadState().threads[i];
|
||||
while (helper.ionBuilder &&
|
||||
CompiledScriptMatches(compartment, script, helper.ionBuilder->script()))
|
||||
{
|
||||
helper.ionBuilder->cancel();
|
||||
WorkerThreadState().wait(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().wait(GlobalHelperThreadState::CONSUMER);
|
||||
}
|
||||
}
|
||||
|
||||
/* Cancel code generation for any completed entries. */
|
||||
GlobalWorkerThreadState::IonBuilderVector &finished = WorkerThreadState().ionFinishedList();
|
||||
GlobalHelperThreadState::IonBuilderVector &finished = HelperThreadState().ionFinishedList();
|
||||
for (size_t i = 0; i < finished.length(); i++) {
|
||||
jit::IonBuilder *builder = finished[i];
|
||||
if (CompiledScriptMatches(compartment, script, builder->script())) {
|
||||
jit::FinishOffThreadBuilder(builder);
|
||||
WorkerThreadState().remove(finished, &i);
|
||||
HelperThreadState().remove(finished, &i);
|
||||
}
|
||||
}
|
||||
#endif // JS_ION
|
||||
}
|
||||
|
||||
static const JSClass workerGlobalClass = {
|
||||
"internal-worker-global", JSCLASS_GLOBAL_FLAGS,
|
||||
static const JSClass parseTaskGlobalClass = {
|
||||
"internal-parse-task-global", JSCLASS_GLOBAL_FLAGS,
|
||||
JS_PropertyStub, JS_DeletePropertyStub,
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
JS_EnumerateStub, JS_ResolveStub,
|
||||
|
@ -232,9 +232,9 @@ ParseTask::~ParseTask()
|
|||
void
|
||||
js::CancelOffThreadParses(JSRuntime *rt)
|
||||
{
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
if (!WorkerThreadState().threads)
|
||||
if (!HelperThreadState().threads)
|
||||
return;
|
||||
|
||||
// Instead of forcibly canceling pending parse tasks, just wait for all scheduled
|
||||
|
@ -242,7 +242,7 @@ js::CancelOffThreadParses(JSRuntime *rt)
|
|||
// everything due to zones being used off thread.
|
||||
while (true) {
|
||||
bool pending = false;
|
||||
GlobalWorkerThreadState::ParseTaskVector &worklist = WorkerThreadState().parseWorklist();
|
||||
GlobalHelperThreadState::ParseTaskVector &worklist = HelperThreadState().parseWorklist();
|
||||
for (size_t i = 0; i < worklist.length(); i++) {
|
||||
ParseTask *task = worklist[i];
|
||||
if (task->runtimeMatches(rt))
|
||||
|
@ -250,27 +250,27 @@ js::CancelOffThreadParses(JSRuntime *rt)
|
|||
}
|
||||
if (!pending) {
|
||||
bool inProgress = false;
|
||||
for (size_t i = 0; i < WorkerThreadState().threadCount; i++) {
|
||||
ParseTask *task = WorkerThreadState().threads[i].parseTask;
|
||||
for (size_t i = 0; i < HelperThreadState().threadCount; i++) {
|
||||
ParseTask *task = HelperThreadState().threads[i].parseTask;
|
||||
if (task && task->runtimeMatches(rt))
|
||||
inProgress = true;
|
||||
}
|
||||
if (!inProgress)
|
||||
break;
|
||||
}
|
||||
WorkerThreadState().wait(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().wait(GlobalHelperThreadState::CONSUMER);
|
||||
}
|
||||
|
||||
// Clean up any parse tasks which haven't been finished by the main thread.
|
||||
GlobalWorkerThreadState::ParseTaskVector &finished = WorkerThreadState().parseFinishedList();
|
||||
GlobalHelperThreadState::ParseTaskVector &finished = HelperThreadState().parseFinishedList();
|
||||
while (true) {
|
||||
bool found = false;
|
||||
for (size_t i = 0; i < finished.length(); i++) {
|
||||
ParseTask *task = finished[i];
|
||||
if (task->runtimeMatches(rt)) {
|
||||
found = true;
|
||||
AutoUnlockWorkerThreadState unlock;
|
||||
WorkerThreadState().finishParseTask(/* maybecx = */ nullptr, rt, task);
|
||||
AutoUnlockHelperThreadState unlock;
|
||||
HelperThreadState().finishParseTask(/* maybecx = */ nullptr, rt, task);
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
|
@ -302,7 +302,7 @@ js::StartOffThreadParseScript(JSContext *cx, const ReadOnlyCompileOptions &optio
|
|||
SourceBufferHolder srcBuf(chars, length, SourceBufferHolder::NoOwnership);
|
||||
frontend::MaybeCallSourceHandler(cx, options, srcBuf);
|
||||
|
||||
EnsureWorkerThreadsInitialized(cx);
|
||||
EnsureHelperThreadsInitialized(cx);
|
||||
|
||||
JS::CompartmentOptions compartmentOptions(cx->compartment()->options());
|
||||
compartmentOptions.setZone(JS::FreshZone);
|
||||
|
@ -312,7 +312,7 @@ js::StartOffThreadParseScript(JSContext *cx, const ReadOnlyCompileOptions &optio
|
|||
// Don't falsely inherit the host's global trace hook.
|
||||
compartmentOptions.setTrace(nullptr);
|
||||
|
||||
JSObject *global = JS_NewGlobalObject(cx, &workerGlobalClass, nullptr,
|
||||
JSObject *global = JS_NewGlobalObject(cx, &parseTaskGlobalClass, nullptr,
|
||||
JS::FireOnNewGlobalHook, compartmentOptions);
|
||||
if (!global)
|
||||
return false;
|
||||
|
@ -342,36 +342,36 @@ js::StartOffThreadParseScript(JSContext *cx, const ReadOnlyCompileOptions &optio
|
|||
}
|
||||
}
|
||||
|
||||
ScopedJSDeletePtr<ExclusiveContext> workercx(
|
||||
ScopedJSDeletePtr<ExclusiveContext> helpercx(
|
||||
cx->new_<ExclusiveContext>(cx->runtime(), (PerThreadData *) nullptr,
|
||||
ThreadSafeContext::Context_Exclusive));
|
||||
if (!workercx)
|
||||
if (!helpercx)
|
||||
return false;
|
||||
|
||||
ScopedJSDeletePtr<ParseTask> task(
|
||||
cx->new_<ParseTask>(workercx.get(), global, cx, chars, length,
|
||||
cx->new_<ParseTask>(helpercx.get(), global, cx, chars, length,
|
||||
callback, callbackData));
|
||||
if (!task)
|
||||
return false;
|
||||
|
||||
workercx.forget();
|
||||
helpercx.forget();
|
||||
|
||||
if (!task->init(cx, options))
|
||||
return false;
|
||||
|
||||
if (OffThreadParsingMustWaitForGC(cx->runtime())) {
|
||||
AutoLockWorkerThreadState lock;
|
||||
if (!WorkerThreadState().parseWaitingOnGC().append(task.get()))
|
||||
AutoLockHelperThreadState lock;
|
||||
if (!HelperThreadState().parseWaitingOnGC().append(task.get()))
|
||||
return false;
|
||||
} else {
|
||||
task->activate(cx->runtime());
|
||||
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
if (!WorkerThreadState().parseWorklist().append(task.get()))
|
||||
if (!HelperThreadState().parseWorklist().append(task.get()))
|
||||
return false;
|
||||
|
||||
WorkerThreadState().notifyOne(GlobalWorkerThreadState::PRODUCER);
|
||||
HelperThreadState().notifyOne(GlobalHelperThreadState::PRODUCER);
|
||||
}
|
||||
|
||||
task.forget();
|
||||
|
@ -384,16 +384,16 @@ js::EnqueuePendingParseTasksAfterGC(JSRuntime *rt)
|
|||
{
|
||||
JS_ASSERT(!OffThreadParsingMustWaitForGC(rt));
|
||||
|
||||
GlobalWorkerThreadState::ParseTaskVector newTasks;
|
||||
GlobalHelperThreadState::ParseTaskVector newTasks;
|
||||
{
|
||||
AutoLockWorkerThreadState lock;
|
||||
GlobalWorkerThreadState::ParseTaskVector &waiting = WorkerThreadState().parseWaitingOnGC();
|
||||
AutoLockHelperThreadState lock;
|
||||
GlobalHelperThreadState::ParseTaskVector &waiting = HelperThreadState().parseWaitingOnGC();
|
||||
|
||||
for (size_t i = 0; i < waiting.length(); i++) {
|
||||
ParseTask *task = waiting[i];
|
||||
if (task->runtimeMatches(rt)) {
|
||||
newTasks.append(task);
|
||||
WorkerThreadState().remove(waiting, &i);
|
||||
HelperThreadState().remove(waiting, &i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -407,44 +407,44 @@ js::EnqueuePendingParseTasksAfterGC(JSRuntime *rt)
|
|||
for (size_t i = 0; i < newTasks.length(); i++)
|
||||
newTasks[i]->activate(rt);
|
||||
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
for (size_t i = 0; i < newTasks.length(); i++)
|
||||
WorkerThreadState().parseWorklist().append(newTasks[i]);
|
||||
HelperThreadState().parseWorklist().append(newTasks[i]);
|
||||
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::PRODUCER);
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::PRODUCER);
|
||||
}
|
||||
|
||||
static const uint32_t WORKER_STACK_SIZE = 512 * 1024;
|
||||
static const uint32_t WORKER_STACK_QUOTA = 450 * 1024;
|
||||
static const uint32_t HELPER_STACK_SIZE = 512 * 1024;
|
||||
static const uint32_t HELPER_STACK_QUOTA = 450 * 1024;
|
||||
|
||||
void
|
||||
GlobalWorkerThreadState::ensureInitialized()
|
||||
GlobalHelperThreadState::ensureInitialized()
|
||||
{
|
||||
JS_ASSERT(this == &WorkerThreadState());
|
||||
AutoLockWorkerThreadState lock;
|
||||
JS_ASSERT(this == &HelperThreadState());
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
if (threads)
|
||||
return;
|
||||
|
||||
threads = js_pod_calloc<WorkerThread>(threadCount);
|
||||
threads = js_pod_calloc<HelperThread>(threadCount);
|
||||
if (!threads)
|
||||
CrashAtUnhandlableOOM("GlobalWorkerThreadState::ensureInitialized");
|
||||
CrashAtUnhandlableOOM("GlobalHelperThreadState::ensureInitialized");
|
||||
|
||||
for (size_t i = 0; i < threadCount; i++) {
|
||||
WorkerThread &helper = threads[i];
|
||||
HelperThread &helper = threads[i];
|
||||
helper.threadData.construct(static_cast<JSRuntime *>(nullptr));
|
||||
helper.thread = PR_CreateThread(PR_USER_THREAD,
|
||||
WorkerThread::ThreadMain, &helper,
|
||||
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, WORKER_STACK_SIZE);
|
||||
HelperThread::ThreadMain, &helper,
|
||||
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, HELPER_STACK_SIZE);
|
||||
if (!helper.thread || !helper.threadData.ref().init())
|
||||
CrashAtUnhandlableOOM("GlobalWorkerThreadState::ensureInitialized");
|
||||
CrashAtUnhandlableOOM("GlobalHelperThreadState::ensureInitialized");
|
||||
}
|
||||
|
||||
resetAsmJSFailureState();
|
||||
}
|
||||
|
||||
GlobalWorkerThreadState::GlobalWorkerThreadState()
|
||||
GlobalHelperThreadState::GlobalHelperThreadState()
|
||||
{
|
||||
mozilla::PodZero(this);
|
||||
|
||||
|
@ -453,13 +453,13 @@ GlobalWorkerThreadState::GlobalWorkerThreadState()
|
|||
|
||||
MOZ_ASSERT(cpuCount > 0, "GetCPUCount() seems broken");
|
||||
|
||||
workerLock = PR_NewLock();
|
||||
consumerWakeup = PR_NewCondVar(workerLock);
|
||||
producerWakeup = PR_NewCondVar(workerLock);
|
||||
helperLock = PR_NewLock();
|
||||
consumerWakeup = PR_NewCondVar(helperLock);
|
||||
producerWakeup = PR_NewCondVar(helperLock);
|
||||
}
|
||||
|
||||
void
|
||||
GlobalWorkerThreadState::finish()
|
||||
GlobalHelperThreadState::finish()
|
||||
{
|
||||
if (threads) {
|
||||
for (size_t i = 0; i < threadCount; i++)
|
||||
|
@ -469,40 +469,40 @@ GlobalWorkerThreadState::finish()
|
|||
|
||||
PR_DestroyCondVar(consumerWakeup);
|
||||
PR_DestroyCondVar(producerWakeup);
|
||||
PR_DestroyLock(workerLock);
|
||||
PR_DestroyLock(helperLock);
|
||||
}
|
||||
|
||||
void
|
||||
GlobalWorkerThreadState::lock()
|
||||
GlobalHelperThreadState::lock()
|
||||
{
|
||||
JS_ASSERT(!isLocked());
|
||||
AssertCurrentThreadCanLock(WorkerThreadStateLock);
|
||||
PR_Lock(workerLock);
|
||||
AssertCurrentThreadCanLock(HelperThreadStateLock);
|
||||
PR_Lock(helperLock);
|
||||
#ifdef DEBUG
|
||||
lockOwner = PR_GetCurrentThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
GlobalWorkerThreadState::unlock()
|
||||
GlobalHelperThreadState::unlock()
|
||||
{
|
||||
JS_ASSERT(isLocked());
|
||||
#ifdef DEBUG
|
||||
lockOwner = nullptr;
|
||||
#endif
|
||||
PR_Unlock(workerLock);
|
||||
PR_Unlock(helperLock);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
bool
|
||||
GlobalWorkerThreadState::isLocked()
|
||||
GlobalHelperThreadState::isLocked()
|
||||
{
|
||||
return lockOwner == PR_GetCurrentThread();
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
GlobalWorkerThreadState::wait(CondVar which, uint32_t millis)
|
||||
GlobalHelperThreadState::wait(CondVar which, uint32_t millis)
|
||||
{
|
||||
JS_ASSERT(isLocked());
|
||||
#ifdef DEBUG
|
||||
|
@ -518,21 +518,21 @@ GlobalWorkerThreadState::wait(CondVar which, uint32_t millis)
|
|||
}
|
||||
|
||||
void
|
||||
GlobalWorkerThreadState::notifyAll(CondVar which)
|
||||
GlobalHelperThreadState::notifyAll(CondVar which)
|
||||
{
|
||||
JS_ASSERT(isLocked());
|
||||
PR_NotifyAllCondVar((which == CONSUMER) ? consumerWakeup : producerWakeup);
|
||||
}
|
||||
|
||||
void
|
||||
GlobalWorkerThreadState::notifyOne(CondVar which)
|
||||
GlobalHelperThreadState::notifyOne(CondVar which)
|
||||
{
|
||||
JS_ASSERT(isLocked());
|
||||
PR_NotifyCondVar((which == CONSUMER) ? consumerWakeup : producerWakeup);
|
||||
}
|
||||
|
||||
bool
|
||||
GlobalWorkerThreadState::canStartAsmJSCompile()
|
||||
GlobalHelperThreadState::canStartAsmJSCompile()
|
||||
{
|
||||
// Don't execute an AsmJS job if an earlier one failed.
|
||||
JS_ASSERT(isLocked());
|
||||
|
@ -540,10 +540,10 @@ GlobalWorkerThreadState::canStartAsmJSCompile()
|
|||
}
|
||||
|
||||
bool
|
||||
GlobalWorkerThreadState::canStartIonCompile()
|
||||
GlobalHelperThreadState::canStartIonCompile()
|
||||
{
|
||||
// A worker thread can begin an Ion compilation if (a) there is some script
|
||||
// which is waiting to be compiled, and (b) no other worker thread is
|
||||
// A helper thread can begin an Ion compilation if (a) there is some script
|
||||
// which is waiting to be compiled, and (b) no other helper thread is
|
||||
// currently compiling a script. The latter condition ensures that two
|
||||
// compilations cannot simultaneously occur.
|
||||
if (ionWorklist().empty())
|
||||
|
@ -556,11 +556,11 @@ GlobalWorkerThreadState::canStartIonCompile()
|
|||
}
|
||||
|
||||
bool
|
||||
GlobalWorkerThreadState::canStartParseTask()
|
||||
GlobalHelperThreadState::canStartParseTask()
|
||||
{
|
||||
// Don't allow simultaneous off thread parses, to reduce contention on the
|
||||
// atoms table. Note that asm.js compilation depends on this to avoid
|
||||
// stalling the worker thread, as off thread parse tasks can trigger and
|
||||
// stalling the helper thread, as off thread parse tasks can trigger and
|
||||
// block on other off thread asm.js compilation tasks.
|
||||
JS_ASSERT(isLocked());
|
||||
if (parseWorklist().empty())
|
||||
|
@ -573,13 +573,13 @@ GlobalWorkerThreadState::canStartParseTask()
|
|||
}
|
||||
|
||||
bool
|
||||
GlobalWorkerThreadState::canStartCompressionTask()
|
||||
GlobalHelperThreadState::canStartCompressionTask()
|
||||
{
|
||||
return !compressionWorklist().empty();
|
||||
}
|
||||
|
||||
bool
|
||||
GlobalWorkerThreadState::canStartGCHelperTask()
|
||||
GlobalHelperThreadState::canStartGCHelperTask()
|
||||
{
|
||||
return !gcHelperWorklist().empty();
|
||||
}
|
||||
|
@ -612,14 +612,14 @@ CallNewScriptHookForAllScripts(JSContext *cx, HandleScript script)
|
|||
}
|
||||
|
||||
JSScript *
|
||||
GlobalWorkerThreadState::finishParseTask(JSContext *maybecx, JSRuntime *rt, void *token)
|
||||
GlobalHelperThreadState::finishParseTask(JSContext *maybecx, JSRuntime *rt, void *token)
|
||||
{
|
||||
ScopedJSDeletePtr<ParseTask> parseTask;
|
||||
|
||||
// The token is a ParseTask* which should be in the finished list.
|
||||
// Find and remove its entry.
|
||||
{
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
ParseTaskVector &finished = parseFinishedList();
|
||||
for (size_t i = 0; i < finished.length(); i++) {
|
||||
if (finished[i] == token) {
|
||||
|
@ -707,15 +707,15 @@ GlobalWorkerThreadState::finishParseTask(JSContext *maybecx, JSRuntime *rt, void
|
|||
}
|
||||
|
||||
void
|
||||
WorkerThread::destroy()
|
||||
HelperThread::destroy()
|
||||
{
|
||||
if (thread) {
|
||||
{
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
terminate = true;
|
||||
|
||||
/* Notify all workers, to ensure that this thread wakes up. */
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::PRODUCER);
|
||||
/* Notify all helpers, to ensure that this thread wakes up. */
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::PRODUCER);
|
||||
}
|
||||
|
||||
PR_JoinThread(thread);
|
||||
|
@ -734,7 +734,7 @@ MFBT_API void NuwaMarkCurrentThread(void (*recreate)(void *), void *arg);
|
|||
|
||||
/* static */
|
||||
void
|
||||
WorkerThread::ThreadMain(void *arg)
|
||||
HelperThread::ThreadMain(void *arg)
|
||||
{
|
||||
PR_SetCurrentThreadName("Analysis Helper");
|
||||
|
||||
|
@ -745,22 +745,22 @@ WorkerThread::ThreadMain(void *arg)
|
|||
}
|
||||
#endif
|
||||
|
||||
static_cast<WorkerThread *>(arg)->threadLoop();
|
||||
static_cast<HelperThread *>(arg)->threadLoop();
|
||||
}
|
||||
|
||||
void
|
||||
WorkerThread::handleAsmJSWorkload()
|
||||
HelperThread::handleAsmJSWorkload()
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(WorkerThreadState().isLocked());
|
||||
JS_ASSERT(WorkerThreadState().canStartAsmJSCompile());
|
||||
JS_ASSERT(HelperThreadState().isLocked());
|
||||
JS_ASSERT(HelperThreadState().canStartAsmJSCompile());
|
||||
JS_ASSERT(idle());
|
||||
|
||||
asmData = WorkerThreadState().asmJSWorklist().popCopy();
|
||||
asmData = HelperThreadState().asmJSWorklist().popCopy();
|
||||
bool success = false;
|
||||
|
||||
do {
|
||||
AutoUnlockWorkerThreadState unlock;
|
||||
AutoUnlockHelperThreadState unlock;
|
||||
PerThreadData::AutoEnterRuntime enter(threadData.addr(), asmData->runtime);
|
||||
|
||||
jit::IonContext icx(asmData->mir->compartment->runtime(),
|
||||
|
@ -784,33 +784,33 @@ WorkerThread::handleAsmJSWorkload()
|
|||
|
||||
// On failure, signal parent for harvesting in CancelOutstandingJobs().
|
||||
if (!success) {
|
||||
WorkerThreadState().noteAsmJSFailure(asmData->func);
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().noteAsmJSFailure(asmData->func);
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::CONSUMER);
|
||||
asmData = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
// On success, move work to the finished list.
|
||||
WorkerThreadState().asmJSFinishedList().append(asmData);
|
||||
HelperThreadState().asmJSFinishedList().append(asmData);
|
||||
asmData = nullptr;
|
||||
|
||||
// Notify the main thread in case it's blocked waiting for a LifoAlloc.
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::CONSUMER);
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif // JS_ION
|
||||
}
|
||||
|
||||
void
|
||||
WorkerThread::handleIonWorkload()
|
||||
HelperThread::handleIonWorkload()
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(WorkerThreadState().isLocked());
|
||||
JS_ASSERT(WorkerThreadState().canStartIonCompile());
|
||||
JS_ASSERT(HelperThreadState().isLocked());
|
||||
JS_ASSERT(HelperThreadState().canStartIonCompile());
|
||||
JS_ASSERT(idle());
|
||||
|
||||
// Find the ionBuilder with the script having the highest usecount.
|
||||
GlobalWorkerThreadState::IonBuilderVector &ionWorklist = WorkerThreadState().ionWorklist();
|
||||
GlobalHelperThreadState::IonBuilderVector &ionWorklist = HelperThreadState().ionWorklist();
|
||||
size_t highest = 0;
|
||||
for (size_t i = 1; i < ionWorklist.length(); i++) {
|
||||
if (ionWorklist[i]->script()->getUseCount() >
|
||||
|
@ -835,7 +835,7 @@ WorkerThread::handleIonWorkload()
|
|||
JSRuntime *rt = ionBuilder->script()->compartment()->runtimeFromAnyThread();
|
||||
|
||||
{
|
||||
AutoUnlockWorkerThreadState unlock;
|
||||
AutoUnlockHelperThreadState unlock;
|
||||
PerThreadData::AutoEnterRuntime enter(threadData.addr(),
|
||||
ionBuilder->script()->runtimeFromAnyThread());
|
||||
jit::IonContext ictx(jit::CompileRuntime::get(rt),
|
||||
|
@ -854,17 +854,17 @@ WorkerThread::handleIonWorkload()
|
|||
rt->requestInterrupt(JSRuntime::RequestInterruptAnyThreadDontStopIon);
|
||||
|
||||
// Notify the main thread in case it is waiting for the compilation to finish.
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::CONSUMER);
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif // JS_ION
|
||||
}
|
||||
|
||||
void
|
||||
ExclusiveContext::setWorkerThread(WorkerThread *workerThread)
|
||||
ExclusiveContext::setHelperThread(HelperThread *thread)
|
||||
{
|
||||
workerThread_ = workerThread;
|
||||
perThreadData = workerThread->threadData.addr();
|
||||
helperThread_ = thread;
|
||||
perThreadData = thread->threadData.addr();
|
||||
}
|
||||
|
||||
frontend::CompileError &
|
||||
|
@ -873,7 +873,7 @@ ExclusiveContext::addPendingCompileError()
|
|||
frontend::CompileError *error = js_new<frontend::CompileError>();
|
||||
if (!error)
|
||||
MOZ_CRASH();
|
||||
if (!workerThread()->parseTask->errors.append(error))
|
||||
if (!helperThread()->parseTask->errors.append(error))
|
||||
MOZ_CRASH();
|
||||
return *error;
|
||||
}
|
||||
|
@ -881,22 +881,22 @@ ExclusiveContext::addPendingCompileError()
|
|||
void
|
||||
ExclusiveContext::addPendingOverRecursed()
|
||||
{
|
||||
if (workerThread()->parseTask)
|
||||
workerThread()->parseTask->overRecursed = true;
|
||||
if (helperThread()->parseTask)
|
||||
helperThread()->parseTask->overRecursed = true;
|
||||
}
|
||||
|
||||
void
|
||||
WorkerThread::handleParseWorkload()
|
||||
HelperThread::handleParseWorkload()
|
||||
{
|
||||
JS_ASSERT(WorkerThreadState().isLocked());
|
||||
JS_ASSERT(WorkerThreadState().canStartParseTask());
|
||||
JS_ASSERT(HelperThreadState().isLocked());
|
||||
JS_ASSERT(HelperThreadState().canStartParseTask());
|
||||
JS_ASSERT(idle());
|
||||
|
||||
parseTask = WorkerThreadState().parseWorklist().popCopy();
|
||||
parseTask->cx->setWorkerThread(this);
|
||||
parseTask = HelperThreadState().parseWorklist().popCopy();
|
||||
parseTask->cx->setHelperThread(this);
|
||||
|
||||
{
|
||||
AutoUnlockWorkerThreadState unlock;
|
||||
AutoUnlockHelperThreadState unlock;
|
||||
PerThreadData::AutoEnterRuntime enter(threadData.addr(),
|
||||
parseTask->exclusiveContextGlobal->runtimeFromAnyThread());
|
||||
SourceBufferHolder srcBuf(parseTask->chars, parseTask->length,
|
||||
|
@ -912,55 +912,55 @@ WorkerThread::handleParseWorkload()
|
|||
|
||||
// FinishOffThreadScript will need to be called on the script to
|
||||
// migrate it into the correct compartment.
|
||||
WorkerThreadState().parseFinishedList().append(parseTask);
|
||||
HelperThreadState().parseFinishedList().append(parseTask);
|
||||
|
||||
parseTask = nullptr;
|
||||
|
||||
// Notify the main thread in case it is waiting for the parse/emit to finish.
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::CONSUMER);
|
||||
}
|
||||
|
||||
void
|
||||
WorkerThread::handleCompressionWorkload()
|
||||
HelperThread::handleCompressionWorkload()
|
||||
{
|
||||
JS_ASSERT(WorkerThreadState().isLocked());
|
||||
JS_ASSERT(WorkerThreadState().canStartCompressionTask());
|
||||
JS_ASSERT(HelperThreadState().isLocked());
|
||||
JS_ASSERT(HelperThreadState().canStartCompressionTask());
|
||||
JS_ASSERT(idle());
|
||||
|
||||
compressionTask = WorkerThreadState().compressionWorklist().popCopy();
|
||||
compressionTask->workerThread = this;
|
||||
compressionTask = HelperThreadState().compressionWorklist().popCopy();
|
||||
compressionTask->helperThread = this;
|
||||
|
||||
{
|
||||
AutoUnlockWorkerThreadState unlock;
|
||||
AutoUnlockHelperThreadState unlock;
|
||||
compressionTask->result = compressionTask->work();
|
||||
}
|
||||
|
||||
compressionTask->workerThread = nullptr;
|
||||
compressionTask->helperThread = nullptr;
|
||||
compressionTask = nullptr;
|
||||
|
||||
// Notify the main thread in case it is waiting for the compression to finish.
|
||||
WorkerThreadState().notifyAll(GlobalWorkerThreadState::CONSUMER);
|
||||
HelperThreadState().notifyAll(GlobalHelperThreadState::CONSUMER);
|
||||
}
|
||||
|
||||
bool
|
||||
js::StartOffThreadCompression(ExclusiveContext *cx, SourceCompressionTask *task)
|
||||
{
|
||||
EnsureWorkerThreadsInitialized(cx);
|
||||
EnsureHelperThreadsInitialized(cx);
|
||||
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
if (!WorkerThreadState().compressionWorklist().append(task)) {
|
||||
if (!HelperThreadState().compressionWorklist().append(task)) {
|
||||
if (JSContext *maybecx = cx->maybeJSContext())
|
||||
js_ReportOutOfMemory(maybecx);
|
||||
return false;
|
||||
}
|
||||
|
||||
WorkerThreadState().notifyOne(GlobalWorkerThreadState::PRODUCER);
|
||||
HelperThreadState().notifyOne(GlobalHelperThreadState::PRODUCER);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
GlobalWorkerThreadState::compressionInProgress(SourceCompressionTask *task)
|
||||
GlobalHelperThreadState::compressionInProgress(SourceCompressionTask *task)
|
||||
{
|
||||
JS_ASSERT(isLocked());
|
||||
for (size_t i = 0; i < compressionWorklist().length(); i++) {
|
||||
|
@ -983,9 +983,9 @@ SourceCompressionTask::complete()
|
|||
}
|
||||
|
||||
{
|
||||
AutoLockWorkerThreadState lock;
|
||||
while (WorkerThreadState().compressionInProgress(this))
|
||||
WorkerThreadState().wait(GlobalWorkerThreadState::CONSUMER);
|
||||
AutoLockHelperThreadState lock;
|
||||
while (HelperThreadState().compressionInProgress(this))
|
||||
HelperThreadState().wait(GlobalHelperThreadState::CONSUMER);
|
||||
}
|
||||
|
||||
if (result == Success) {
|
||||
|
@ -1010,7 +1010,7 @@ SourceCompressionTask::complete()
|
|||
}
|
||||
|
||||
SourceCompressionTask *
|
||||
GlobalWorkerThreadState::compressionTaskForSource(ScriptSource *ss)
|
||||
GlobalHelperThreadState::compressionTaskForSource(ScriptSource *ss)
|
||||
{
|
||||
JS_ASSERT(isLocked());
|
||||
for (size_t i = 0; i < compressionWorklist().length(); i++) {
|
||||
|
@ -1027,17 +1027,17 @@ GlobalWorkerThreadState::compressionTaskForSource(ScriptSource *ss)
|
|||
}
|
||||
|
||||
void
|
||||
WorkerThread::handleGCHelperWorkload()
|
||||
HelperThread::handleGCHelperWorkload()
|
||||
{
|
||||
JS_ASSERT(WorkerThreadState().isLocked());
|
||||
JS_ASSERT(WorkerThreadState().canStartGCHelperTask());
|
||||
JS_ASSERT(HelperThreadState().isLocked());
|
||||
JS_ASSERT(HelperThreadState().canStartGCHelperTask());
|
||||
JS_ASSERT(idle());
|
||||
|
||||
JS_ASSERT(!gcHelperState);
|
||||
gcHelperState = WorkerThreadState().gcHelperWorklist().popCopy();
|
||||
gcHelperState = HelperThreadState().gcHelperWorklist().popCopy();
|
||||
|
||||
{
|
||||
AutoUnlockWorkerThreadState unlock;
|
||||
AutoUnlockHelperThreadState unlock;
|
||||
gcHelperState->work();
|
||||
}
|
||||
|
||||
|
@ -1045,19 +1045,19 @@ WorkerThread::handleGCHelperWorkload()
|
|||
}
|
||||
|
||||
void
|
||||
WorkerThread::threadLoop()
|
||||
HelperThread::threadLoop()
|
||||
{
|
||||
JS::AutoAssertNoGC nogc;
|
||||
AutoLockWorkerThreadState lock;
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
js::TlsPerThreadData.set(threadData.addr());
|
||||
|
||||
// Compute the thread's stack limit, for over-recursed checks.
|
||||
uintptr_t stackLimit = GetNativeStackBase();
|
||||
#if JS_STACK_GROWTH_DIRECTION > 0
|
||||
stackLimit += WORKER_STACK_QUOTA;
|
||||
stackLimit += HELPER_STACK_QUOTA;
|
||||
#else
|
||||
stackLimit -= WORKER_STACK_QUOTA;
|
||||
stackLimit -= HELPER_STACK_QUOTA;
|
||||
#endif
|
||||
for (size_t i = 0; i < ArrayLength(threadData.ref().nativeStackLimit); i++)
|
||||
threadData.ref().nativeStackLimit[i] = stackLimit;
|
||||
|
@ -1069,27 +1069,27 @@ WorkerThread::threadLoop()
|
|||
while (true) {
|
||||
if (terminate)
|
||||
return;
|
||||
if (WorkerThreadState().canStartIonCompile() ||
|
||||
WorkerThreadState().canStartAsmJSCompile() ||
|
||||
WorkerThreadState().canStartParseTask() ||
|
||||
WorkerThreadState().canStartCompressionTask() ||
|
||||
WorkerThreadState().canStartGCHelperTask())
|
||||
if (HelperThreadState().canStartIonCompile() ||
|
||||
HelperThreadState().canStartAsmJSCompile() ||
|
||||
HelperThreadState().canStartParseTask() ||
|
||||
HelperThreadState().canStartCompressionTask() ||
|
||||
HelperThreadState().canStartGCHelperTask())
|
||||
{
|
||||
break;
|
||||
}
|
||||
WorkerThreadState().wait(GlobalWorkerThreadState::PRODUCER);
|
||||
HelperThreadState().wait(GlobalHelperThreadState::PRODUCER);
|
||||
}
|
||||
|
||||
// Dispatch tasks, prioritizing AsmJS work.
|
||||
if (WorkerThreadState().canStartAsmJSCompile())
|
||||
if (HelperThreadState().canStartAsmJSCompile())
|
||||
handleAsmJSWorkload();
|
||||
else if (WorkerThreadState().canStartIonCompile())
|
||||
else if (HelperThreadState().canStartIonCompile())
|
||||
handleIonWorkload();
|
||||
else if (WorkerThreadState().canStartParseTask())
|
||||
else if (HelperThreadState().canStartParseTask())
|
||||
handleParseWorkload();
|
||||
else if (WorkerThreadState().canStartCompressionTask())
|
||||
else if (HelperThreadState().canStartCompressionTask())
|
||||
handleCompressionWorkload();
|
||||
else if (WorkerThreadState().canStartGCHelperTask())
|
||||
else if (HelperThreadState().canStartGCHelperTask())
|
||||
handleGCHelperWorkload();
|
||||
else
|
||||
MOZ_ASSUME_UNREACHABLE("No task to perform");
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/*
|
||||
* Definitions for managing off-main-thread work using a shared, per runtime
|
||||
* worklist. Worklist items are engine internal, and are distinct from e.g.
|
||||
* web workers.
|
||||
* Definitions for managing off-main-thread work using a process wide list
|
||||
* of worklist items and pool of threads. Worklist items are engine internal,
|
||||
* and are distinct from e.g. web workers.
|
||||
*/
|
||||
|
||||
#ifndef jsworkers_h
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace js {
|
||||
|
||||
struct WorkerThread;
|
||||
struct HelperThread;
|
||||
struct AsmJSParallelTask;
|
||||
struct ParseTask;
|
||||
namespace jit {
|
||||
|
@ -34,7 +34,7 @@ namespace jit {
|
|||
#ifdef JS_THREADSAFE
|
||||
|
||||
// Per-process state for off thread work items.
|
||||
class GlobalWorkerThreadState
|
||||
class GlobalHelperThreadState
|
||||
{
|
||||
public:
|
||||
// Number of CPUs to treat this machine as having when creating threads.
|
||||
|
@ -51,7 +51,7 @@ class GlobalWorkerThreadState
|
|||
typedef Vector<GCHelperState *, 0, SystemAllocPolicy> GCHelperStateVector;
|
||||
|
||||
// List of available threads, or null if the thread state has not been initialized.
|
||||
WorkerThread *threads;
|
||||
HelperThread *threads;
|
||||
|
||||
private:
|
||||
// The lists below are all protected by |lock|.
|
||||
|
@ -86,7 +86,7 @@ class GlobalWorkerThreadState
|
|||
GCHelperStateVector gcHelperWorklist_;
|
||||
|
||||
public:
|
||||
GlobalWorkerThreadState();
|
||||
GlobalHelperThreadState();
|
||||
|
||||
void ensureInitialized();
|
||||
void finish();
|
||||
|
@ -178,7 +178,7 @@ class GlobalWorkerThreadState
|
|||
asmJSFailedFunction = func;
|
||||
numAsmJSFailedJobs++;
|
||||
}
|
||||
bool asmJSWorkerFailed() const {
|
||||
bool asmJSFailed() const {
|
||||
return bool(numAsmJSFailedJobs);
|
||||
}
|
||||
void resetAsmJSFailureState() {
|
||||
|
@ -199,8 +199,7 @@ class GlobalWorkerThreadState
|
|||
* Lock protecting all mutable shared state accessed by helper threads, and
|
||||
* used by all condition variables.
|
||||
*/
|
||||
PRLock *workerLock;
|
||||
|
||||
PRLock *helperLock;
|
||||
# ifdef DEBUG
|
||||
PRThread *lockOwner;
|
||||
# endif
|
||||
|
@ -210,7 +209,7 @@ class GlobalWorkerThreadState
|
|||
PRCondVar *producerWakeup;
|
||||
|
||||
/*
|
||||
* Number of AsmJS workers that encountered failure for the active module.
|
||||
* Number of AsmJS jobs that encountered failure for the active module.
|
||||
* Their parent is logically the main thread, and this number serves for harvesting.
|
||||
*/
|
||||
uint32_t numAsmJSFailedJobs;
|
||||
|
@ -222,15 +221,15 @@ class GlobalWorkerThreadState
|
|||
void *asmJSFailedFunction;
|
||||
};
|
||||
|
||||
static inline GlobalWorkerThreadState &
|
||||
WorkerThreadState()
|
||||
static inline GlobalHelperThreadState &
|
||||
HelperThreadState()
|
||||
{
|
||||
extern GlobalWorkerThreadState gWorkerThreadState;
|
||||
return gWorkerThreadState;
|
||||
extern GlobalHelperThreadState gHelperThreadState;
|
||||
return gHelperThreadState;
|
||||
}
|
||||
|
||||
/* Individual helper thread, one allocated per core. */
|
||||
struct WorkerThread
|
||||
struct HelperThread
|
||||
{
|
||||
mozilla::Maybe<PerThreadData> threadData;
|
||||
PRThread *thread;
|
||||
|
@ -271,11 +270,11 @@ struct WorkerThread
|
|||
|
||||
#endif /* JS_THREADSAFE */
|
||||
|
||||
/* Methods for interacting with worker threads. */
|
||||
/* Methods for interacting with helper threads. */
|
||||
|
||||
// Initialize worker threads unless already initialized.
|
||||
// Initialize helper threads unless already initialized.
|
||||
void
|
||||
EnsureWorkerThreadsInitialized(ExclusiveContext *cx);
|
||||
EnsureHelperThreadsInitialized(ExclusiveContext *cx);
|
||||
|
||||
// This allows the JS shell to override GetCPUCount() when passed the
|
||||
// --thread-count=N option.
|
||||
|
@ -328,48 +327,48 @@ EnqueuePendingParseTasksAfterGC(JSRuntime *rt);
|
|||
bool
|
||||
StartOffThreadCompression(ExclusiveContext *cx, SourceCompressionTask *task);
|
||||
|
||||
class AutoLockWorkerThreadState
|
||||
class AutoLockHelperThreadState
|
||||
{
|
||||
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
public:
|
||||
AutoLockWorkerThreadState(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
|
||||
AutoLockHelperThreadState(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
|
||||
{
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
WorkerThreadState().lock();
|
||||
HelperThreadState().lock();
|
||||
}
|
||||
|
||||
~AutoLockWorkerThreadState() {
|
||||
WorkerThreadState().unlock();
|
||||
~AutoLockHelperThreadState() {
|
||||
HelperThreadState().unlock();
|
||||
}
|
||||
#else
|
||||
public:
|
||||
AutoLockWorkerThreadState(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
|
||||
AutoLockHelperThreadState(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
|
||||
{
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
class AutoUnlockWorkerThreadState
|
||||
class AutoUnlockHelperThreadState
|
||||
{
|
||||
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
|
||||
public:
|
||||
|
||||
AutoUnlockWorkerThreadState(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
|
||||
AutoUnlockHelperThreadState(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
|
||||
{
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
#ifdef JS_THREADSAFE
|
||||
WorkerThreadState().unlock();
|
||||
HelperThreadState().unlock();
|
||||
#endif
|
||||
}
|
||||
|
||||
~AutoUnlockWorkerThreadState()
|
||||
~AutoUnlockHelperThreadState()
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
WorkerThreadState().lock();
|
||||
HelperThreadState().lock();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
@ -380,8 +379,8 @@ struct AsmJSParallelTask
|
|||
JSRuntime *runtime; // Associated runtime.
|
||||
LifoAlloc lifo; // Provider of all heap memory used for compilation.
|
||||
void *func; // Really, a ModuleCompiler::Func*
|
||||
jit::MIRGenerator *mir; // Passed from main thread to worker.
|
||||
jit::LIRGraph *lir; // Passed from worker to main thread.
|
||||
jit::MIRGenerator *mir; // Passed from main thread to helper.
|
||||
jit::LIRGraph *lir; // Passed from helper to main thread.
|
||||
unsigned compileTime;
|
||||
|
||||
explicit AsmJSParallelTask(size_t defaultChunkSize)
|
||||
|
@ -458,11 +457,11 @@ OffThreadParsingMustWaitForGC(JSRuntime *rt);
|
|||
struct SourceCompressionTask
|
||||
{
|
||||
friend class ScriptSource;
|
||||
friend class WorkerThread;
|
||||
friend class HelperThread;
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
// Thread performing the compression.
|
||||
WorkerThread *workerThread;
|
||||
HelperThread *helperThread;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
@ -471,7 +470,7 @@ struct SourceCompressionTask
|
|||
|
||||
ScriptSource *ss;
|
||||
|
||||
// Atomic flag to indicate to a worker thread that it should abort
|
||||
// Atomic flag to indicate to a helper thread that it should abort
|
||||
// compression on the source.
|
||||
mozilla::Atomic<bool, mozilla::Relaxed> abort_;
|
||||
|
||||
|
@ -490,7 +489,7 @@ struct SourceCompressionTask
|
|||
result(OOM), compressed(nullptr), compressedBytes(0)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
workerThread = nullptr;
|
||||
helperThread = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -850,8 +850,8 @@ JSRuntime::assertCanLock(RuntimeLock which)
|
|||
switch (which) {
|
||||
case ExclusiveAccessLock:
|
||||
JS_ASSERT(exclusiveAccessOwner != PR_GetCurrentThread());
|
||||
case WorkerThreadStateLock:
|
||||
JS_ASSERT(!WorkerThreadState().isLocked());
|
||||
case HelperThreadStateLock:
|
||||
JS_ASSERT(!HelperThreadState().isLocked());
|
||||
case InterruptLock:
|
||||
JS_ASSERT(!currentThreadOwnsInterruptLock());
|
||||
case GCLock:
|
||||
|
|
|
@ -432,7 +432,7 @@ AtomStateOffsetToName(const JSAtomState &atomState, size_t offset)
|
|||
// the acquisition must be done in the order below to avoid deadlocks.
|
||||
enum RuntimeLock {
|
||||
ExclusiveAccessLock,
|
||||
WorkerThreadStateLock,
|
||||
HelperThreadStateLock,
|
||||
InterruptLock,
|
||||
GCLock
|
||||
};
|
||||
|
|
|
@ -290,7 +290,7 @@ uint32_t
|
|||
ThreadPool::numWorkers() const
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
return WorkerThreadState().cpuCount;
|
||||
return HelperThreadState().cpuCount;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
|
|
|
@ -309,7 +309,8 @@ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsSynthVoiceRegistry,
|
|||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(AudioManager)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(AudioManager,
|
||||
AudioManager::GetInstance)
|
||||
#endif
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(AudioChannelAgent)
|
||||
|
|
|
@ -117,7 +117,7 @@ fails == flexbox-inlinecontent-horiz-1b.xhtml flexbox-inlinecontent-horiz-1-ref.
|
|||
fails-if(B2G&&browserIsRemote) == flexbox-inlinecontent-horiz-2.xhtml flexbox-inlinecontent-horiz-2-ref.xhtml
|
||||
== flexbox-inlinecontent-horiz-3a.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
|
||||
fails-if(B2G&&browserIsRemote) == flexbox-inlinecontent-horiz-3b.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
|
||||
fails-if(B2G&&browserIsRemote) == flexbox-inlinecontent-horiz-3c.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
|
||||
random-if(B2G&&browserIsRemote) == flexbox-inlinecontent-horiz-3c.xhtml flexbox-inlinecontent-horiz-3-ref.xhtml
|
||||
== flexbox-inlinecontent-horiz-4.xhtml flexbox-inlinecontent-horiz-4-ref.xhtml
|
||||
== flexbox-inlinecontent-horiz-5.xhtml flexbox-inlinecontent-horiz-5-ref.xhtml
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "nsNetUtil.h"
|
||||
|
||||
#include "nsICachingChannel.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsISeekableStream.h"
|
||||
#include "nsITimedChannel.h"
|
||||
#include "nsIEncodedChannel.h"
|
||||
|
@ -1858,6 +1859,13 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
|
|||
newChannel->SetNotificationCallbacks(mCallbacks);
|
||||
newChannel->SetLoadFlags(newLoadFlags);
|
||||
|
||||
// If our owner is a null principal it will have been set as a security
|
||||
// measure, so we want to propagate it to the new channel.
|
||||
nsCOMPtr<nsIPrincipal> ownerPrincipal = do_QueryInterface(mOwner);
|
||||
if (ownerPrincipal && ownerPrincipal->GetIsNullPrincipal()) {
|
||||
newChannel->SetOwner(mOwner);
|
||||
}
|
||||
|
||||
// Try to preserve the privacy bit if it has been overridden
|
||||
if (mPrivateBrowsingOverriden) {
|
||||
nsCOMPtr<nsIPrivateBrowsingChannel> newPBChannel =
|
||||
|
|
|
@ -1759,14 +1759,11 @@ nsHttpConnection::MakeConnectString(nsAHttpTransaction *trans,
|
|||
request->SetHeader(nsHttp::Proxy_Connection, NS_LITERAL_CSTRING("keep-alive"));
|
||||
request->SetHeader(nsHttp::Connection, NS_LITERAL_CSTRING("keep-alive"));
|
||||
|
||||
const char *val = trans->RequestHead()->PeekHeader(nsHttp::Host);
|
||||
if (val) {
|
||||
// all HTTP/1.1 requests must include a Host header (even though it
|
||||
// may seem redundant in this case; see bug 82388).
|
||||
request->SetHeader(nsHttp::Host, nsDependentCString(val));
|
||||
}
|
||||
// all HTTP/1.1 requests must include a Host header (even though it
|
||||
// may seem redundant in this case; see bug 82388).
|
||||
request->SetHeader(nsHttp::Host, result);
|
||||
|
||||
val = trans->RequestHead()->PeekHeader(nsHttp::Proxy_Authorization);
|
||||
const char *val = trans->RequestHead()->PeekHeader(nsHttp::Proxy_Authorization);
|
||||
if (val) {
|
||||
// we don't know for sure if this authorization is intended for the
|
||||
// SSL proxy, so we add it just in case.
|
||||
|
|
|
@ -253,26 +253,7 @@ DEFAULT_GMAKE_FLAGS += MAKE_OBJDIR='$$(INSTALL) -D $$(OBJDIR)'
|
|||
# it, creating race conditions. See bug #836220
|
||||
DEFAULT_GMAKE_FLAGS += TARGETS='$$(LIBRARY) $$(SHARED_LIBRARY) $$(PROGRAM)'
|
||||
|
||||
ifdef MOZ_NSS_PATCH
|
||||
# If we're applying a patch, we'll copy the NSS source to the objdir
|
||||
# and build it from there.
|
||||
NSS_SRCDIR = $(CURDIR)/nss
|
||||
|
||||
# This will copy and patch the NSS source for every build.
|
||||
# Since we "cp -p", it won't force rebuilds for most files, just
|
||||
# for patched files, but that's easier than trying to track
|
||||
# dependencies for patched files.
|
||||
export::
|
||||
rm -rf $(NSS_SRCDIR)
|
||||
$(NSINSTALL) -D $(NSS_SRCDIR)/security
|
||||
cp -Rp $(topsrcdir)/security/nss $(NSS_SRCDIR)/security
|
||||
cp -Rp $(topsrcdir)/security/coreconf $(NSS_SRCDIR)/security
|
||||
cp -Rp $(topsrcdir)/security/dbm $(NSS_SRCDIR)/security
|
||||
cp -Rp $(topsrcdir)/dbm $(NSS_SRCDIR)
|
||||
(cd $(NSS_SRCDIR) && patch -p1 < $(abspath $(MOZ_NSS_PATCH)))
|
||||
else
|
||||
NSS_SRCDIR = $(topsrcdir)
|
||||
endif
|
||||
|
||||
NSS_DIRS =
|
||||
ifndef MOZ_FOLD_LIBS
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "cert.h"
|
||||
#include "certdb.h"
|
||||
#include "base64.h"
|
||||
#include "hasht.h"
|
||||
#include "pkix/nullptr.h"
|
||||
#include "pkix/pkixtypes.h"
|
||||
#include "pk11pub.h"
|
||||
|
@ -29,7 +30,7 @@ struct nsMyTrustedEVInfo
|
|||
const char* oid_name; // Set this to null to signal an invalid structure,
|
||||
// (We can't have an empty list, so we'll use a dummy entry)
|
||||
SECOidTag oid_tag;
|
||||
const unsigned char ev_root_sha1_fingerprint[20];
|
||||
const unsigned char ev_root_sha256_fingerprint[SHA256_LENGTH];
|
||||
const char* issuer_base64;
|
||||
const char* serial_base64;
|
||||
CERTCertificate* cert;
|
||||
|
@ -51,7 +52,7 @@ struct nsMyTrustedEVInfo
|
|||
// Build standalone NSS including the NSS tools, then run
|
||||
// pp -t certificate-identity -i the-cert-filename
|
||||
//
|
||||
// You will need the output from sections "Issuer", "Fingerprint (SHA1)",
|
||||
// You will need the output from sections "Issuer", "Fingerprint (SHA-256)",
|
||||
// "Issuer DER Base64" and "Serial DER Base64".
|
||||
//
|
||||
// The new section consists of 8 lines:
|
||||
|
@ -70,7 +71,7 @@ struct nsMyTrustedEVInfo
|
|||
// to be sure).
|
||||
// - the constant SEC_OID_UNKNOWN
|
||||
// (it will be replaced at runtime with another identifier)
|
||||
// - the SHA1 fingerprint
|
||||
// - the SHA-256 fingerprint
|
||||
// - the "Issuer DER Base64" as printed by the pp tool.
|
||||
// Remove all whitespaces. If you use multiple lines, make sure that
|
||||
// only the final line will be followed by a comma.
|
||||
|
@ -80,7 +81,7 @@ struct nsMyTrustedEVInfo
|
|||
// After adding an entry, test it locally against the test site that
|
||||
// has been provided by the CA. Note that you must use a version of NSS
|
||||
// where the root certificate has already been added and marked as trusted
|
||||
// for issueing SSL server certificates (at least).
|
||||
// for issuing SSL server certificates (at least).
|
||||
//
|
||||
// If you are able to connect to the site without certificate errors,
|
||||
// but you don't see the EV status indicator, then most likely the CA
|
||||
|
@ -107,8 +108,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.13769.666.666.666.1.500.9.1",
|
||||
"DEBUGtesting EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x9C, 0x62, 0xEF, 0xDB, 0xAE, 0xF9, 0xEB, 0x36, 0x58, 0xFB,
|
||||
0x3B, 0xD3, 0x47, 0x64, 0x93, 0x9D, 0x86, 0x29, 0x6A, 0xE0 },
|
||||
{ 0x2D, 0x94, 0x52, 0x70, 0xAA, 0x92, 0x13, 0x0B, 0x1F, 0xB1, 0x24,
|
||||
0x0B, 0x24, 0xB1, 0xEE, 0x4E, 0xFB, 0x7C, 0x43, 0x45, 0x45, 0x7F,
|
||||
0x97, 0x6C, 0x90, 0xBF, 0xD4, 0x8A, 0x04, 0x79, 0xE4, 0x68 },
|
||||
"MIGnMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExFjAUBgNVBAcMDU1vdW50YWlu"
|
||||
"IFZpZXcxIzAhBgNVBAoMGk1vemlsbGEgLSBFViBkZWJ1ZyB0ZXN0IENBMR0wGwYD"
|
||||
"VQQLDBRTZWN1cml0eSBFbmdpbmVlcmluZzEvMC0GA1UEAwwmWFBDU2hlbGwgRVYg"
|
||||
|
@ -122,8 +124,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.2.392.200091.100.721.1",
|
||||
"SECOM EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xFE, 0xB8, 0xC4, 0x32, 0xDC, 0xF9, 0x76, 0x9A, 0xCE, 0xAE,
|
||||
0x3D, 0xD8, 0x90, 0x8F, 0xFD, 0x28, 0x86, 0x65, 0x64, 0x7D },
|
||||
{ 0xA2, 0x2D, 0xBA, 0x68, 0x1E, 0x97, 0x37, 0x6E, 0x2D, 0x39, 0x7D,
|
||||
0x72, 0x8A, 0xAE, 0x3A, 0x9B, 0x62, 0x96, 0xB9, 0xFD, 0xBA, 0x60,
|
||||
0xBC, 0x2E, 0x11, 0xF6, 0x47, 0xF2, 0xC6, 0x75, 0xFB, 0x37 },
|
||||
"MGAxCzAJBgNVBAYTAkpQMSUwIwYDVQQKExxTRUNPTSBUcnVzdCBTeXN0ZW1zIENP"
|
||||
"LixMVEQuMSowKAYDVQQLEyFTZWN1cml0eSBDb21tdW5pY2F0aW9uIEVWIFJvb3RD"
|
||||
"QTE=",
|
||||
|
@ -135,8 +138,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.6334.1.100.1",
|
||||
"Cybertrust EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x5F, 0x43, 0xE5, 0xB1, 0xBF, 0xF8, 0x78, 0x8C, 0xAC, 0x1C,
|
||||
0xC7, 0xCA, 0x4A, 0x9A, 0xC6, 0x22, 0x2B, 0xCC, 0x34, 0xC6 },
|
||||
{ 0x96, 0x0A, 0xDF, 0x00, 0x63, 0xE9, 0x63, 0x56, 0x75, 0x0C, 0x29,
|
||||
0x65, 0xDD, 0x0A, 0x08, 0x67, 0xDA, 0x0B, 0x9C, 0xBD, 0x6E, 0x77,
|
||||
0x71, 0x4A, 0xEA, 0xFB, 0x23, 0x49, 0xAB, 0x39, 0x3D, 0xA3 },
|
||||
"MDsxGDAWBgNVBAoTD0N5YmVydHJ1c3QsIEluYzEfMB0GA1UEAxMWQ3liZXJ0cnVz"
|
||||
"dCBHbG9iYWwgUm9vdA==",
|
||||
"BAAAAAABD4WqLUg=",
|
||||
|
@ -147,8 +151,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.756.1.89.1.2.1.1",
|
||||
"SwissSign EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xD8, 0xC5, 0x38, 0x8A, 0xB7, 0x30, 0x1B, 0x1B, 0x6E, 0xD4,
|
||||
0x7A, 0xE6, 0x45, 0x25, 0x3A, 0x6F, 0x9F, 0x1A, 0x27, 0x61 },
|
||||
{ 0x62, 0xDD, 0x0B, 0xE9, 0xB9, 0xF5, 0x0A, 0x16, 0x3E, 0xA0, 0xF8,
|
||||
0xE7, 0x5C, 0x05, 0x3B, 0x1E, 0xCA, 0x57, 0xEA, 0x55, 0xC8, 0x68,
|
||||
0x8F, 0x64, 0x7C, 0x68, 0x81, 0xF2, 0xC8, 0x35, 0x7B, 0x95 },
|
||||
"MEUxCzAJBgNVBAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMT"
|
||||
"FlN3aXNzU2lnbiBHb2xkIENBIC0gRzI=",
|
||||
"ALtAHEP1Xk+w",
|
||||
|
@ -159,8 +164,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.23223.1.1.1",
|
||||
"StartCom EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x3E, 0x2B, 0xF7, 0xF2, 0x03, 0x1B, 0x96, 0xF3, 0x8C, 0xE6,
|
||||
0xC4, 0xD8, 0xA8, 0x5D, 0x3E, 0x2D, 0x58, 0x47, 0x6A, 0x0F },
|
||||
{ 0xC7, 0x66, 0xA9, 0xBE, 0xF2, 0xD4, 0x07, 0x1C, 0x86, 0x3A, 0x31,
|
||||
0xAA, 0x49, 0x20, 0xE8, 0x13, 0xB2, 0xD1, 0x98, 0x60, 0x8C, 0xB7,
|
||||
0xB7, 0xCF, 0xE2, 0x11, 0x43, 0xB8, 0x36, 0xDF, 0x09, 0xEA },
|
||||
"MH0xCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1TdGFydENvbSBMdGQuMSswKQYDVQQL"
|
||||
"EyJTZWN1cmUgRGlnaXRhbCBDZXJ0aWZpY2F0ZSBTaWduaW5nMSkwJwYDVQQDEyBT"
|
||||
"dGFydENvbSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eQ==",
|
||||
|
@ -172,8 +178,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.23223.1.1.1",
|
||||
"StartCom EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xA3, 0xF1, 0x33, 0x3F, 0xE2, 0x42, 0xBF, 0xCF, 0xC5, 0xD1,
|
||||
0x4E, 0x8F, 0x39, 0x42, 0x98, 0x40, 0x68, 0x10, 0xD1, 0xA0 },
|
||||
{ 0xE1, 0x78, 0x90, 0xEE, 0x09, 0xA3, 0xFB, 0xF4, 0xF4, 0x8B, 0x9C,
|
||||
0x41, 0x4A, 0x17, 0xD6, 0x37, 0xB7, 0xA5, 0x06, 0x47, 0xE9, 0xBC,
|
||||
0x75, 0x23, 0x22, 0x72, 0x7F, 0xCC, 0x17, 0x42, 0xA9, 0x11 },
|
||||
"MH0xCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1TdGFydENvbSBMdGQuMSswKQYDVQQL"
|
||||
"EyJTZWN1cmUgRGlnaXRhbCBDZXJ0aWZpY2F0ZSBTaWduaW5nMSkwJwYDVQQDEyBT"
|
||||
"dGFydENvbSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eQ==",
|
||||
|
@ -185,8 +192,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.23223.1.1.1",
|
||||
"StartCom EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x31, 0xF1, 0xFD, 0x68, 0x22, 0x63, 0x20, 0xEE, 0xC6, 0x3B,
|
||||
0x3F, 0x9D, 0xEA, 0x4A, 0x3E, 0x53, 0x7C, 0x7C, 0x39, 0x17 },
|
||||
{ 0xC7, 0xBA, 0x65, 0x67, 0xDE, 0x93, 0xA7, 0x98, 0xAE, 0x1F, 0xAA,
|
||||
0x79, 0x1E, 0x71, 0x2D, 0x37, 0x8F, 0xAE, 0x1F, 0x93, 0xC4, 0x39,
|
||||
0x7F, 0xEA, 0x44, 0x1B, 0xB7, 0xCB, 0xE6, 0xFD, 0x59, 0x95 },
|
||||
"MFMxCzAJBgNVBAYTAklMMRYwFAYDVQQKEw1TdGFydENvbSBMdGQuMSwwKgYDVQQD"
|
||||
"EyNTdGFydENvbSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBHMg==",
|
||||
"Ow==",
|
||||
|
@ -197,8 +205,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.113733.1.7.23.6",
|
||||
"VeriSign EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x4E, 0xB6, 0xD5, 0x78, 0x49, 0x9B, 0x1C, 0xCF, 0x5F, 0x58,
|
||||
0x1E, 0xAD, 0x56, 0xBE, 0x3D, 0x9B, 0x67, 0x44, 0xA5, 0xE5 },
|
||||
{ 0x9A, 0xCF, 0xAB, 0x7E, 0x43, 0xC8, 0xD8, 0x80, 0xD0, 0x6B, 0x26,
|
||||
0x2A, 0x94, 0xDE, 0xEE, 0xE4, 0xB4, 0x65, 0x99, 0x89, 0xC3, 0xD0,
|
||||
0xCA, 0xF1, 0x9B, 0xAF, 0x64, 0x05, 0xE4, 0x1A, 0xB7, 0xDF },
|
||||
"MIHKMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNV"
|
||||
"BAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAyMDA2IFZl"
|
||||
"cmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMT"
|
||||
|
@ -212,8 +221,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.14370.1.6",
|
||||
"GeoTrust EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x32, 0x3C, 0x11, 0x8E, 0x1B, 0xF7, 0xB8, 0xB6, 0x52, 0x54,
|
||||
0xE2, 0xE2, 0x10, 0x0D, 0xD6, 0x02, 0x90, 0x37, 0xF0, 0x96 },
|
||||
{ 0x37, 0xD5, 0x10, 0x06, 0xC5, 0x12, 0xEA, 0xAB, 0x62, 0x64, 0x21,
|
||||
0xF1, 0xEC, 0x8C, 0x92, 0x01, 0x3F, 0xC5, 0xF8, 0x2A, 0xE9, 0x8E,
|
||||
0xE5, 0x33, 0xEB, 0x46, 0x19, 0xB8, 0xDE, 0xB4, 0xD0, 0x6C },
|
||||
"MFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQD"
|
||||
"EyhHZW9UcnVzdCBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5",
|
||||
"GKy1av1pthU6Y2yv2vrEoQ==",
|
||||
|
@ -224,8 +234,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.113733.1.7.48.1",
|
||||
"Thawte EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x91, 0xC6, 0xD6, 0xEE, 0x3E, 0x8A, 0xC8, 0x63, 0x84, 0xE5,
|
||||
0x48, 0xC2, 0x99, 0x29, 0x5C, 0x75, 0x6C, 0x81, 0x7B, 0x81 },
|
||||
{ 0x8D, 0x72, 0x2F, 0x81, 0xA9, 0xC1, 0x13, 0xC0, 0x79, 0x1D, 0xF1,
|
||||
0x36, 0xA2, 0x96, 0x6D, 0xB2, 0x6C, 0x95, 0x0A, 0x97, 0x1D, 0xB4,
|
||||
0x6B, 0x41, 0x99, 0xF4, 0xEA, 0x54, 0xB7, 0x8B, 0xFB, 0x9F },
|
||||
"MIGpMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3RlLCBJbmMuMSgwJgYDVQQL"
|
||||
"Ex9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYDVQQLEy8oYykg"
|
||||
"MjAwNiB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0G"
|
||||
|
@ -238,8 +249,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114404.1.1.2.4.1",
|
||||
"Trustwave EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xB8, 0x01, 0x86, 0xD1, 0xEB, 0x9C, 0x86, 0xA5, 0x41, 0x04,
|
||||
0xCF, 0x30, 0x54, 0xF3, 0x4C, 0x52, 0xB7, 0xE5, 0x58, 0xC6 },
|
||||
{ 0xCE, 0xCD, 0xDC, 0x90, 0x50, 0x99, 0xD8, 0xDA, 0xDF, 0xC5, 0xB1,
|
||||
0xD2, 0x09, 0xB7, 0x37, 0xCB, 0xE2, 0xC1, 0x8C, 0xFB, 0x2C, 0x10,
|
||||
0xC0, 0xFF, 0x0B, 0xCF, 0x0D, 0x32, 0x86, 0xFC, 0x1A, 0xA2 },
|
||||
"MIGCMQswCQYDVQQGEwJVUzEeMBwGA1UECxMVd3d3LnhyYW1wc2VjdXJpdHkuY29t"
|
||||
"MSQwIgYDVQQKExtYUmFtcCBTZWN1cml0eSBTZXJ2aWNlcyBJbmMxLTArBgNVBAMT"
|
||||
"JFhSYW1wIEdsb2JhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eQ==",
|
||||
|
@ -251,8 +263,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114404.1.1.2.4.1",
|
||||
"Trustwave EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x87, 0x82, 0xC6, 0xC3, 0x04, 0x35, 0x3B, 0xCF, 0xD2, 0x96,
|
||||
0x92, 0xD2, 0x59, 0x3E, 0x7D, 0x44, 0xD9, 0x34, 0xFF, 0x11 },
|
||||
{ 0xF1, 0xC1, 0xB5, 0x0A, 0xE5, 0xA2, 0x0D, 0xD8, 0x03, 0x0E, 0xC9,
|
||||
0xF6, 0xBC, 0x24, 0x82, 0x3D, 0xD3, 0x67, 0xB5, 0x25, 0x57, 0x59,
|
||||
0xB4, 0xE7, 0x1B, 0x61, 0xFC, 0xE9, 0xF7, 0x37, 0x5D, 0x73 },
|
||||
"MEgxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdTZWN1cmVUcnVzdCBDb3Jwb3JhdGlv"
|
||||
"bjEXMBUGA1UEAxMOU2VjdXJlVHJ1c3QgQ0E=",
|
||||
"DPCOXAgWpa1Cf/DrJxhZ0A==",
|
||||
|
@ -263,8 +276,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114404.1.1.2.4.1",
|
||||
"Trustwave EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x3A, 0x44, 0x73, 0x5A, 0xE5, 0x81, 0x90, 0x1F, 0x24, 0x86,
|
||||
0x61, 0x46, 0x1E, 0x3B, 0x9C, 0xC4, 0x5F, 0xF5, 0x3A, 0x1B },
|
||||
{ 0x42, 0x00, 0xF5, 0x04, 0x3A, 0xC8, 0x59, 0x0E, 0xBB, 0x52, 0x7D,
|
||||
0x20, 0x9E, 0xD1, 0x50, 0x30, 0x29, 0xFB, 0xCB, 0xD4, 0x1C, 0xA1,
|
||||
0xB5, 0x06, 0xEC, 0x27, 0xF1, 0x5A, 0xDE, 0x7D, 0xAC, 0x69 },
|
||||
"MEoxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdTZWN1cmVUcnVzdCBDb3Jwb3JhdGlv"
|
||||
"bjEZMBcGA1UEAxMQU2VjdXJlIEdsb2JhbCBDQQ==",
|
||||
"B1YipOjUiolN9BPI8PjqpQ==",
|
||||
|
@ -275,8 +289,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.6449.1.2.1.5.1",
|
||||
"Comodo EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x9F, 0x74, 0x4E, 0x9F, 0x2B, 0x4D, 0xBA, 0xEC, 0x0F, 0x31,
|
||||
0x2C, 0x50, 0xB6, 0x56, 0x3B, 0x8E, 0x2D, 0x93, 0xC3, 0x11 },
|
||||
{ 0x17, 0x93, 0x92, 0x7A, 0x06, 0x14, 0x54, 0x97, 0x89, 0xAD, 0xCE,
|
||||
0x2F, 0x8F, 0x34, 0xF7, 0xF0, 0xB6, 0x6D, 0x0F, 0x3A, 0xE3, 0xA3,
|
||||
0xB8, 0x4D, 0x21, 0xEC, 0x15, 0xDB, 0xBA, 0x4F, 0xAD, 0xC7 },
|
||||
"MIGFMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAw"
|
||||
"DgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01PRE8gQ0EgTGltaXRlZDErMCkG"
|
||||
"A1UEAxMiQ09NT0RPIEVDQyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eQ==",
|
||||
|
@ -288,8 +303,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.6449.1.2.1.5.1",
|
||||
"Comodo EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x66, 0x31, 0xBF, 0x9E, 0xF7, 0x4F, 0x9E, 0xB6, 0xC9, 0xD5,
|
||||
0xA6, 0x0C, 0xBA, 0x6A, 0xBE, 0xD1, 0xF7, 0xBD, 0xEF, 0x7B },
|
||||
{ 0x0C, 0x2C, 0xD6, 0x3D, 0xF7, 0x80, 0x6F, 0xA3, 0x99, 0xED, 0xE8,
|
||||
0x09, 0x11, 0x6B, 0x57, 0x5B, 0xF8, 0x79, 0x89, 0xF0, 0x65, 0x18,
|
||||
0xF9, 0x80, 0x8C, 0x86, 0x05, 0x03, 0x17, 0x8B, 0xAF, 0x66 },
|
||||
"MIGBMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAw"
|
||||
"DgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01PRE8gQ0EgTGltaXRlZDEnMCUG"
|
||||
"A1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5",
|
||||
|
@ -301,8 +317,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.6449.1.2.1.5.1",
|
||||
"Comodo EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x02, 0xFA, 0xF3, 0xE2, 0x91, 0x43, 0x54, 0x68, 0x60, 0x78,
|
||||
0x57, 0x69, 0x4D, 0xF5, 0xE4, 0x5B, 0x68, 0x85, 0x18, 0x68 },
|
||||
{ 0x68, 0x7F, 0xA4, 0x51, 0x38, 0x22, 0x78, 0xFF, 0xF0, 0xC8, 0xB1,
|
||||
0x1F, 0x8D, 0x43, 0xD5, 0x76, 0x67, 0x1C, 0x6E, 0xB2, 0xBC, 0xEA,
|
||||
0xB4, 0x13, 0xFB, 0x83, 0xD9, 0x65, 0xD0, 0x6D, 0x2F, 0xF2 },
|
||||
"MG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMd"
|
||||
"QWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0"
|
||||
"IEV4dGVybmFsIENBIFJvb3Q=",
|
||||
|
@ -314,8 +331,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.6449.1.2.1.5.1",
|
||||
"Comodo EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x58, 0x11, 0x9F, 0x0E, 0x12, 0x82, 0x87, 0xEA, 0x50, 0xFD,
|
||||
0xD9, 0x87, 0x45, 0x6F, 0x4F, 0x78, 0xDC, 0xFA, 0xD6, 0xD4 },
|
||||
{ 0x85, 0xFB, 0x2F, 0x91, 0xDD, 0x12, 0x27, 0x5A, 0x01, 0x45, 0xB6,
|
||||
0x36, 0x53, 0x4F, 0x84, 0x02, 0x4A, 0xD6, 0x8B, 0x69, 0xB8, 0xEE,
|
||||
0x88, 0x68, 0x4F, 0xF7, 0x11, 0x37, 0x58, 0x05, 0xB3, 0x48 },
|
||||
"MIGTMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFr"
|
||||
"ZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsT"
|
||||
"GGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNv"
|
||||
|
@ -328,8 +346,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.6449.1.2.1.5.1",
|
||||
"Comodo EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x04, 0x83, 0xED, 0x33, 0x99, 0xAC, 0x36, 0x08, 0x05, 0x87,
|
||||
0x22, 0xED, 0xBC, 0x5E, 0x46, 0x00, 0xE3, 0xBE, 0xF9, 0xD7 },
|
||||
{ 0x6E, 0xA5, 0x47, 0x41, 0xD0, 0x04, 0x66, 0x7E, 0xED, 0x1B, 0x48,
|
||||
0x16, 0x63, 0x4A, 0xA3, 0xA7, 0x9E, 0x6E, 0x4B, 0x96, 0x95, 0x0F,
|
||||
0x82, 0x79, 0xDA, 0xFC, 0x8D, 0x9B, 0xD8, 0x81, 0x21, 0x37 },
|
||||
"MIGXMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFr"
|
||||
"ZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsT"
|
||||
"GGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTEfMB0GA1UEAxMWVVROLVVTRVJGaXJz"
|
||||
|
@ -342,8 +361,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114413.1.7.23.3",
|
||||
"Go Daddy EV OID a",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x27, 0x96, 0xBA, 0xE6, 0x3F, 0x18, 0x01, 0xE2, 0x77, 0x26,
|
||||
0x1B, 0xA0, 0xD7, 0x77, 0x70, 0x02, 0x8F, 0x20, 0xEE, 0xE4 },
|
||||
{ 0xC3, 0x84, 0x6B, 0xF2, 0x4B, 0x9E, 0x93, 0xCA, 0x64, 0x27, 0x4C,
|
||||
0x0E, 0xC6, 0x7C, 0x1E, 0xCC, 0x5E, 0x02, 0x4F, 0xFC, 0xAC, 0xD2,
|
||||
0xD7, 0x40, 0x19, 0x35, 0x0E, 0x81, 0xFE, 0x54, 0x6A, 0xE4 },
|
||||
"MGMxCzAJBgNVBAYTAlVTMSEwHwYDVQQKExhUaGUgR28gRGFkZHkgR3JvdXAsIElu"
|
||||
"Yy4xMTAvBgNVBAsTKEdvIERhZGR5IENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRo"
|
||||
"b3JpdHk=",
|
||||
|
@ -355,8 +375,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114413.1.7.23.3",
|
||||
"Go Daddy EV OID a",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x47, 0xBE, 0xAB, 0xC9, 0x22, 0xEA, 0xE8, 0x0E, 0x78, 0x78,
|
||||
0x34, 0x62, 0xA7, 0x9F, 0x45, 0xC2, 0x54, 0xFD, 0xE6, 0x8B },
|
||||
{ 0x45, 0x14, 0x0B, 0x32, 0x47, 0xEB, 0x9C, 0xC8, 0xC5, 0xB4, 0xF0,
|
||||
0xD7, 0xB5, 0x30, 0x91, 0xF7, 0x32, 0x92, 0x08, 0x9E, 0x6E, 0x5A,
|
||||
0x63, 0xE2, 0x74, 0x9D, 0xD3, 0xAC, 0xA9, 0x19, 0x8E, 0xDA },
|
||||
"MIGDMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHQXJpem9uYTETMBEGA1UEBxMKU2Nv"
|
||||
"dHRzZGFsZTEaMBgGA1UEChMRR29EYWRkeS5jb20sIEluYy4xMTAvBgNVBAMTKEdv"
|
||||
"IERhZGR5IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IC0gRzI=",
|
||||
|
@ -368,8 +389,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114414.1.7.23.3",
|
||||
"Go Daddy EV OID b",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xAD, 0x7E, 0x1C, 0x28, 0xB0, 0x64, 0xEF, 0x8F, 0x60, 0x03,
|
||||
0x40, 0x20, 0x14, 0xC3, 0xD0, 0xE3, 0x37, 0x0E, 0xB5, 0x8A },
|
||||
{ 0x14, 0x65, 0xFA, 0x20, 0x53, 0x97, 0xB8, 0x76, 0xFA, 0xA6, 0xF0,
|
||||
0xA9, 0x95, 0x8E, 0x55, 0x90, 0xE4, 0x0F, 0xCC, 0x7F, 0xAA, 0x4F,
|
||||
0xB7, 0xC2, 0xC8, 0x67, 0x75, 0x21, 0xFB, 0x5F, 0xB6, 0x58 },
|
||||
"MGgxCzAJBgNVBAYTAlVTMSUwIwYDVQQKExxTdGFyZmllbGQgVGVjaG5vbG9naWVz"
|
||||
"LCBJbmMuMTIwMAYDVQQLEylTdGFyZmllbGQgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9u"
|
||||
"IEF1dGhvcml0eQ==",
|
||||
|
@ -381,8 +403,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114414.1.7.23.3",
|
||||
"Go Daddy EV OID b",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xB5, 0x1C, 0x06, 0x7C, 0xEE, 0x2B, 0x0C, 0x3D, 0xF8, 0x55,
|
||||
0xAB, 0x2D, 0x92, 0xF4, 0xFE, 0x39, 0xD4, 0xE7, 0x0F, 0x0E },
|
||||
{ 0x2C, 0xE1, 0xCB, 0x0B, 0xF9, 0xD2, 0xF9, 0xE1, 0x02, 0x99, 0x3F,
|
||||
0xBE, 0x21, 0x51, 0x52, 0xC3, 0xB2, 0xDD, 0x0C, 0xAB, 0xDE, 0x1C,
|
||||
0x68, 0xE5, 0x31, 0x9B, 0x83, 0x91, 0x54, 0xDB, 0xB7, 0xF5 },
|
||||
"MIGPMQswCQYDVQQGEwJVUzEQMA4GA1UECBMHQXJpem9uYTETMBEGA1UEBxMKU2Nv"
|
||||
"dHRzZGFsZTElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEy"
|
||||
"MDAGA1UEAxMpU3RhcmZpZWxkIFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IC0g"
|
||||
|
@ -395,8 +418,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114412.2.1",
|
||||
"DigiCert EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x5F, 0xB7, 0xEE, 0x06, 0x33, 0xE2, 0x59, 0xDB, 0xAD, 0x0C,
|
||||
0x4C, 0x9A, 0xE6, 0xD3, 0X8F, 0x1A, 0x61, 0xC7, 0xDC, 0x25 },
|
||||
{ 0x74, 0x31, 0xE5, 0xF4, 0xC3, 0xC1, 0xCE, 0x46, 0x90, 0x77, 0x4F,
|
||||
0x0B, 0x61, 0xE0, 0x54, 0x40, 0x88, 0x3B, 0xA9, 0xA0, 0x1E, 0xD0,
|
||||
0x0B, 0xA6, 0xAB, 0xD7, 0x80, 0x6E, 0xD3, 0xB1, 0x18, 0xCF },
|
||||
"MGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsT"
|
||||
"EHd3dy5kaWdpY2VydC5jb20xKzApBgNVBAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJh"
|
||||
"bmNlIEVWIFJvb3QgQ0E=",
|
||||
|
@ -408,8 +432,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.8024.0.2.100.1.2",
|
||||
"Quo Vadis EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xCA, 0x3A, 0xFB, 0xCF, 0x12, 0x40, 0x36, 0x4B, 0x44, 0xB2,
|
||||
0x16, 0x20, 0x88, 0x80, 0x48, 0x39, 0x19, 0x93, 0x7C, 0xF7 },
|
||||
{ 0x85, 0xA0, 0xDD, 0x7D, 0xD7, 0x20, 0xAD, 0xB7, 0xFF, 0x05, 0xF8,
|
||||
0x3D, 0x54, 0x2B, 0x20, 0x9D, 0xC7, 0xFF, 0x45, 0x28, 0xF7, 0xD6,
|
||||
0x77, 0xB1, 0x83, 0x89, 0xFE, 0xA5, 0xE5, 0xC4, 0x9E, 0x86 },
|
||||
"MEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMRswGQYD"
|
||||
"VQQDExJRdW9WYWRpcyBSb290IENBIDI=",
|
||||
"BQk=",
|
||||
|
@ -420,8 +445,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.782.1.2.1.8.1",
|
||||
"Network Solutions EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x74, 0xF8, 0xA3, 0xC3, 0xEF, 0xE7, 0xB3, 0x90, 0x06, 0x4B,
|
||||
0x83, 0x90, 0x3C, 0x21, 0x64, 0x60, 0x20, 0xE5, 0xDF, 0xCE },
|
||||
{ 0x15, 0xF0, 0xBA, 0x00, 0xA3, 0xAC, 0x7A, 0xF3, 0xAC, 0x88, 0x4C,
|
||||
0x07, 0x2B, 0x10, 0x11, 0xA0, 0x77, 0xBD, 0x77, 0xC0, 0x97, 0xF4,
|
||||
0x01, 0x64, 0xB2, 0xF8, 0x59, 0x8A, 0xBD, 0x83, 0x86, 0x0C },
|
||||
"MGIxCzAJBgNVBAYTAlVTMSEwHwYDVQQKExhOZXR3b3JrIFNvbHV0aW9ucyBMLkwu"
|
||||
"Qy4xMDAuBgNVBAMTJ05ldHdvcmsgU29sdXRpb25zIENlcnRpZmljYXRlIEF1dGhv"
|
||||
"cml0eQ==",
|
||||
|
@ -433,8 +459,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.114028.10.1.2",
|
||||
"Entrust EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xB3, 0x1E, 0xB1, 0xB7, 0x40, 0xE3, 0x6C, 0x84, 0x02, 0xDA,
|
||||
0xDC, 0x37, 0xD4, 0x4D, 0xF5, 0xD4, 0x67, 0x49, 0x52, 0xF9 },
|
||||
{ 0x73, 0xC1, 0x76, 0x43, 0x4F, 0x1B, 0xC6, 0xD5, 0xAD, 0xF4, 0x5B,
|
||||
0x0E, 0x76, 0xE7, 0x27, 0x28, 0x7C, 0x8D, 0xE5, 0x76, 0x16, 0xC1,
|
||||
0xE6, 0xE6, 0x14, 0x1A, 0x2B, 0x2C, 0xBC, 0x7D, 0x8E, 0x4C },
|
||||
"MIGwMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNRW50cnVzdCwgSW5jLjE5MDcGA1UE"
|
||||
"CxMwd3d3LmVudHJ1c3QubmV0L0NQUyBpcyBpbmNvcnBvcmF0ZWQgYnkgcmVmZXJl"
|
||||
"bmNlMR8wHQYDVQQLExYoYykgMjAwNiBFbnRydXN0LCBJbmMuMS0wKwYDVQQDEyRF"
|
||||
|
@ -447,8 +474,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.4146.1.1",
|
||||
"GlobalSign EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xB1, 0xBC, 0x96, 0x8B, 0xD4, 0xF4, 0x9D, 0x62, 0x2A, 0xA8,
|
||||
0x9A, 0x81, 0xF2, 0x15, 0x01, 0x52, 0xA4, 0x1D, 0x82, 0x9C },
|
||||
{ 0xEB, 0xD4, 0x10, 0x40, 0xE4, 0xBB, 0x3E, 0xC7, 0x42, 0xC9, 0xE3,
|
||||
0x81, 0xD3, 0x1E, 0xF2, 0xA4, 0x1A, 0x48, 0xB6, 0x68, 0x5C, 0x96,
|
||||
0xE7, 0xCE, 0xF3, 0xC1, 0xDF, 0x6C, 0xD4, 0x33, 0x1C, 0x99 },
|
||||
"MFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYD"
|
||||
"VQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxTaWduIFJvb3QgQ0E=",
|
||||
"BAAAAAABFUtaw5Q=",
|
||||
|
@ -459,8 +487,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.4146.1.1",
|
||||
"GlobalSign EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x75, 0xE0, 0xAB, 0xB6, 0x13, 0x85, 0x12, 0x27, 0x1C, 0x04,
|
||||
0xF8, 0x5F, 0xDD, 0xDE, 0x38, 0xE4, 0xB7, 0x24, 0x2E, 0xFE },
|
||||
{ 0xCA, 0x42, 0xDD, 0x41, 0x74, 0x5F, 0xD0, 0xB8, 0x1E, 0xB9, 0x02,
|
||||
0x36, 0x2C, 0xF9, 0xD8, 0xBF, 0x71, 0x9D, 0xA1, 0xBD, 0x1B, 0x1E,
|
||||
0xFC, 0x94, 0x6F, 0x5B, 0x4C, 0x99, 0xF4, 0x2C, 0x1B, 0x9E },
|
||||
"MEwxIDAeBgNVBAsTF0dsb2JhbFNpZ24gUm9vdCBDQSAtIFIyMRMwEQYDVQQKEwpH"
|
||||
"bG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWdu",
|
||||
"BAAAAAABD4Ym5g0=",
|
||||
|
@ -471,8 +500,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.4146.1.1",
|
||||
"GlobalSign EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xD6, 0x9B, 0x56, 0x11, 0x48, 0xF0, 0x1C, 0x77, 0xC5, 0x45,
|
||||
0x78, 0xC1, 0x09, 0x26, 0xDF, 0x5B, 0x85, 0x69, 0x76, 0xAD },
|
||||
{ 0xCB, 0xB5, 0x22, 0xD7, 0xB7, 0xF1, 0x27, 0xAD, 0x6A, 0x01, 0x13,
|
||||
0x86, 0x5B, 0xDF, 0x1C, 0xD4, 0x10, 0x2E, 0x7D, 0x07, 0x59, 0xAF,
|
||||
0x63, 0x5A, 0x7C, 0xF4, 0x72, 0x0D, 0xC9, 0x63, 0xC5, 0x3B },
|
||||
"MEwxIDAeBgNVBAsTF0dsb2JhbFNpZ24gUm9vdCBDQSAtIFIzMRMwEQYDVQQKEwpH"
|
||||
"bG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWdu",
|
||||
"BAAAAAABIVhTCKI=",
|
||||
|
@ -483,8 +513,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.578.1.26.1.3.3",
|
||||
"Buypass EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x61, 0x57, 0x3A, 0x11, 0xDF, 0x0E, 0xD8, 0x7E, 0xD5, 0x92,
|
||||
0x65, 0x22, 0xEA, 0xD0, 0x56, 0xD7, 0x44, 0xB3, 0x23, 0x71 },
|
||||
{ 0xB7, 0xB1, 0x2B, 0x17, 0x1F, 0x82, 0x1D, 0xAA, 0x99, 0x0C, 0xD0,
|
||||
0xFE, 0x50, 0x87, 0xB1, 0x28, 0x44, 0x8B, 0xA8, 0xE5, 0x18, 0x4F,
|
||||
0x84, 0xC5, 0x1E, 0x02, 0xB5, 0xC8, 0xFB, 0x96, 0x2B, 0x24 },
|
||||
"MEsxCzAJBgNVBAYTAk5PMR0wGwYDVQQKDBRCdXlwYXNzIEFTLTk4MzE2MzMyNzEd"
|
||||
"MBsGA1UEAwwUQnV5cGFzcyBDbGFzcyAzIENBIDE=",
|
||||
"Ag==",
|
||||
|
@ -495,8 +526,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.578.1.26.1.3.3",
|
||||
"Buypass EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xDA, 0xFA, 0xF7, 0xFA, 0x66, 0x84, 0xEC, 0x06, 0x8F, 0x14,
|
||||
0x50, 0xBD, 0xC7, 0xC2, 0x81, 0xA5, 0xBC, 0xA9, 0x64, 0x57 },
|
||||
{ 0xED, 0xF7, 0xEB, 0xBC, 0xA2, 0x7A, 0x2A, 0x38, 0x4D, 0x38, 0x7B,
|
||||
0x7D, 0x40, 0x10, 0xC6, 0x66, 0xE2, 0xED, 0xB4, 0x84, 0x3E, 0x4C,
|
||||
0x29, 0xB4, 0xAE, 0x1D, 0x5B, 0x93, 0x32, 0xE6, 0xB2, 0x4D },
|
||||
"ME4xCzAJBgNVBAYTAk5PMR0wGwYDVQQKDBRCdXlwYXNzIEFTLTk4MzE2MzMyNzEg"
|
||||
"MB4GA1UEAwwXQnV5cGFzcyBDbGFzcyAzIFJvb3QgQ0E=",
|
||||
"Ag==",
|
||||
|
@ -507,8 +539,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.22234.2.5.2.3.1",
|
||||
"Certplus EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x74, 0x20, 0x74, 0x41, 0x72, 0x9C, 0xDD, 0x92, 0xEC, 0x79,
|
||||
0x31, 0xD8, 0x23, 0x10, 0x8D, 0xC2, 0x81, 0x92, 0xE2, 0xBB },
|
||||
{ 0x0F, 0x99, 0x3C, 0x8A, 0xEF, 0x97, 0xBA, 0xAF, 0x56, 0x87, 0x14,
|
||||
0x0E, 0xD5, 0x9A, 0xD1, 0x82, 0x1B, 0xB4, 0xAF, 0xAC, 0xF0, 0xAA,
|
||||
0x9A, 0x58, 0xB5, 0xD5, 0x7A, 0x33, 0x8A, 0x3A, 0xFB, 0xCB },
|
||||
"MD0xCzAJBgNVBAYTAkZSMREwDwYDVQQKEwhDZXJ0cGx1czEbMBkGA1UEAxMSQ2xh"
|
||||
"c3MgMiBQcmltYXJ5IENB",
|
||||
"AIW9S/PY2uNp9pTXX8OlRCM=",
|
||||
|
@ -519,8 +552,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.17326.10.14.2.1.2",
|
||||
"Camerfirma EV OID a",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x78, 0x6A, 0x74, 0xAC, 0x76, 0xAB, 0x14, 0x7F, 0x9C, 0x6A,
|
||||
0x30, 0x50, 0xBA, 0x9E, 0xA8, 0x7E, 0xFE, 0x9A, 0xCE, 0x3C },
|
||||
{ 0x06, 0x3E, 0x4A, 0xFA, 0xC4, 0x91, 0xDF, 0xD3, 0x32, 0xF3, 0x08,
|
||||
0x9B, 0x85, 0x42, 0xE9, 0x46, 0x17, 0xD8, 0x93, 0xD7, 0xFE, 0x94,
|
||||
0x4E, 0x10, 0xA7, 0x93, 0x7E, 0xE2, 0x9D, 0x96, 0x93, 0xC0 },
|
||||
"MIGuMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBh"
|
||||
"ZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ"
|
||||
"QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xKTAnBgNVBAMT"
|
||||
|
@ -533,8 +567,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.17326.10.8.12.1.2",
|
||||
"Camerfirma EV OID b",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x4A, 0xBD, 0xEE, 0xEC, 0x95, 0x0D, 0x35, 0x9C, 0x89, 0xAE,
|
||||
0xC7, 0x52, 0xA1, 0x2C, 0x5B, 0x29, 0xF6, 0xD6, 0xAA, 0x0C },
|
||||
{ 0x13, 0x63, 0x35, 0x43, 0x93, 0x34, 0xA7, 0x69, 0x80, 0x16, 0xA0,
|
||||
0xD3, 0x24, 0xDE, 0x72, 0x28, 0x4E, 0x07, 0x9D, 0x7B, 0x52, 0x20,
|
||||
0xBB, 0x8F, 0xBD, 0x74, 0x78, 0x16, 0xEE, 0xBE, 0xBA, 0xCA },
|
||||
"MIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBh"
|
||||
"ZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ"
|
||||
"QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMT"
|
||||
|
@ -547,8 +582,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.2.276.0.44.1.1.1.4",
|
||||
"TC TrustCenter EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x96, 0x56, 0xCD, 0x7B, 0x57, 0x96, 0x98, 0x95, 0xD0, 0xE1,
|
||||
0x41, 0x46, 0x68, 0x06, 0xFB, 0xB8, 0xC6, 0x11, 0x06, 0x87 },
|
||||
{ 0x30, 0x9B, 0x4A, 0x87, 0xF6, 0xCA, 0x56, 0xC9, 0x31, 0x69, 0xAA,
|
||||
0xA9, 0x9C, 0x6D, 0x98, 0x88, 0x54, 0xD7, 0x89, 0x2B, 0xD5, 0x43,
|
||||
0x7E, 0x2D, 0x07, 0xB2, 0x9C, 0xBE, 0xDA, 0x55, 0xD3, 0x5D },
|
||||
"MHsxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNUQyBUcnVzdENlbnRlciBHbWJIMSQw"
|
||||
"IgYDVQQLExtUQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0ExKDAmBgNVBAMTH1RD"
|
||||
"IFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQSBJSUk=",
|
||||
|
@ -560,8 +596,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.34697.2.1",
|
||||
"AffirmTrust EV OID a",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xF9, 0xB5, 0xB6, 0x32, 0x45, 0x5F, 0x9C, 0xBE, 0xEC, 0x57,
|
||||
0x5F, 0x80, 0xDC, 0xE9, 0x6E, 0x2C, 0xC7, 0xB2, 0x78, 0xB7 },
|
||||
{ 0x03, 0x76, 0xAB, 0x1D, 0x54, 0xC5, 0xF9, 0x80, 0x3C, 0xE4, 0xB2,
|
||||
0xE2, 0x01, 0xA0, 0xEE, 0x7E, 0xEF, 0x7B, 0x57, 0xB6, 0x36, 0xE8,
|
||||
0xA9, 0x3C, 0x9B, 0x8D, 0x48, 0x60, 0xC9, 0x6F, 0x5F, 0xA7 },
|
||||
"MEQxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEfMB0GA1UEAwwW"
|
||||
"QWZmaXJtVHJ1c3QgQ29tbWVyY2lhbA==",
|
||||
"d3cGJyapsXw=",
|
||||
|
@ -572,8 +609,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.34697.2.2",
|
||||
"AffirmTrust EV OID b",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x29, 0x36, 0x21, 0x02, 0x8B, 0x20, 0xED, 0x02, 0xF5, 0x66,
|
||||
0xC5, 0x32, 0xD1, 0xD6, 0xED, 0x90, 0x9F, 0x45, 0x00, 0x2F },
|
||||
{ 0x0A, 0x81, 0xEC, 0x5A, 0x92, 0x97, 0x77, 0xF1, 0x45, 0x90, 0x4A,
|
||||
0xF3, 0x8D, 0x5D, 0x50, 0x9F, 0x66, 0xB5, 0xE2, 0xC5, 0x8F, 0xCD,
|
||||
0xB5, 0x31, 0x05, 0x8B, 0x0E, 0x17, 0xF3, 0xF0, 0xB4, 0x1B },
|
||||
"MEQxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEfMB0GA1UEAwwW"
|
||||
"QWZmaXJtVHJ1c3QgTmV0d29ya2luZw==",
|
||||
"fE8EORzUmS0=",
|
||||
|
@ -584,8 +622,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.34697.2.3",
|
||||
"AffirmTrust EV OID c",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xD8, 0xA6, 0x33, 0x2C, 0xE0, 0x03, 0x6F, 0xB1, 0x85, 0xF6,
|
||||
0x63, 0x4F, 0x7D, 0x6A, 0x06, 0x65, 0x26, 0x32, 0x28, 0x27 },
|
||||
{ 0x70, 0xA7, 0x3F, 0x7F, 0x37, 0x6B, 0x60, 0x07, 0x42, 0x48, 0x90,
|
||||
0x45, 0x34, 0xB1, 0x14, 0x82, 0xD5, 0xBF, 0x0E, 0x69, 0x8E, 0xCC,
|
||||
0x49, 0x8D, 0xF5, 0x25, 0x77, 0xEB, 0xF2, 0xE9, 0x3B, 0x9A },
|
||||
"MEExCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEcMBoGA1UEAwwT"
|
||||
"QWZmaXJtVHJ1c3QgUHJlbWl1bQ==",
|
||||
"bYwURrGmCu4=",
|
||||
|
@ -596,8 +635,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.34697.2.4",
|
||||
"AffirmTrust EV OID d",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xB8, 0x23, 0x6B, 0x00, 0x2F, 0x1D, 0x16, 0x86, 0x53, 0x01,
|
||||
0x55, 0x6C, 0x11, 0xA4, 0x37, 0xCA, 0xEB, 0xFF, 0xC3, 0xBB },
|
||||
{ 0xBD, 0x71, 0xFD, 0xF6, 0xDA, 0x97, 0xE4, 0xCF, 0x62, 0xD1, 0x64,
|
||||
0x7A, 0xDD, 0x25, 0x81, 0xB0, 0x7D, 0x79, 0xAD, 0xF8, 0x39, 0x7E,
|
||||
0xB4, 0xEC, 0xBA, 0x9C, 0x5E, 0x84, 0x88, 0x82, 0x14, 0x23 },
|
||||
"MEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwX"
|
||||
"QWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0M=",
|
||||
"dJclisc/elQ=",
|
||||
|
@ -608,8 +648,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.2.616.1.113527.2.5.1.1",
|
||||
"Certum EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x07, 0xE0, 0x32, 0xE0, 0x20, 0xB7, 0x2C, 0x3F, 0x19, 0x2F,
|
||||
0x06, 0x28, 0xA2, 0x59, 0x3A, 0x19, 0xA7, 0x0F, 0x06, 0x9E },
|
||||
{ 0x5C, 0x58, 0x46, 0x8D, 0x55, 0xF5, 0x8E, 0x49, 0x7E, 0x74, 0x39,
|
||||
0x82, 0xD2, 0xB5, 0x00, 0x10, 0xB6, 0xD1, 0x65, 0x37, 0x4A, 0xCF,
|
||||
0x83, 0xA7, 0xD4, 0xA3, 0x2D, 0xB7, 0x68, 0xC4, 0x40, 0x8E },
|
||||
"MH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQKExlVbml6ZXRvIFRlY2hub2xvZ2llcyBT"
|
||||
"LkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIjAg"
|
||||
"BgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0E=",
|
||||
|
@ -621,8 +662,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.14777.6.1.1",
|
||||
"Izenpe EV OID 1",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x2F, 0x78, 0x3D, 0x25, 0x52, 0x18, 0xA7, 0x4A, 0x65, 0x39,
|
||||
0x71, 0xB5, 0x2C, 0xA2, 0x9C, 0x45, 0x15, 0x6F, 0xE9, 0x19 },
|
||||
{ 0x25, 0x30, 0xCC, 0x8E, 0x98, 0x32, 0x15, 0x02, 0xBA, 0xD9, 0x6F,
|
||||
0x9B, 0x1F, 0xBA, 0x1B, 0x09, 0x9E, 0x2D, 0x29, 0x9E, 0x0F, 0x45,
|
||||
0x48, 0xBB, 0x91, 0x4F, 0x36, 0x3B, 0xC0, 0xD4, 0x53, 0x1F },
|
||||
"MDgxCzAJBgNVBAYTAkVTMRQwEgYDVQQKDAtJWkVOUEUgUy5BLjETMBEGA1UEAwwK"
|
||||
"SXplbnBlLmNvbQ==",
|
||||
"ALC3WhZIX7/hy/WL1xnmfQ==",
|
||||
|
@ -633,8 +675,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.14777.6.1.2",
|
||||
"Izenpe EV OID 2",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x2F, 0x78, 0x3D, 0x25, 0x52, 0x18, 0xA7, 0x4A, 0x65, 0x39,
|
||||
0x71, 0xB5, 0x2C, 0xA2, 0x9C, 0x45, 0x15, 0x6F, 0xE9, 0x19 },
|
||||
{ 0x25, 0x30, 0xCC, 0x8E, 0x98, 0x32, 0x15, 0x02, 0xBA, 0xD9, 0x6F,
|
||||
0x9B, 0x1F, 0xBA, 0x1B, 0x09, 0x9E, 0x2D, 0x29, 0x9E, 0x0F, 0x45,
|
||||
0x48, 0xBB, 0x91, 0x4F, 0x36, 0x3B, 0xC0, 0xD4, 0x53, 0x1F },
|
||||
"MDgxCzAJBgNVBAYTAkVTMRQwEgYDVQQKDAtJWkVOUEUgUy5BLjETMBEGA1UEAwwK"
|
||||
"SXplbnBlLmNvbQ==",
|
||||
"ALC3WhZIX7/hy/WL1xnmfQ==",
|
||||
|
@ -645,8 +688,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.2.40.0.17.1.22",
|
||||
"A-Trust EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xD3, 0xC0, 0x63, 0xF2, 0x19, 0xED, 0x07, 0x3E, 0x34, 0xAD,
|
||||
0x5D, 0x75, 0x0B, 0x32, 0x76, 0x29, 0xFF, 0xD5, 0x9A, 0xF2 },
|
||||
{ 0x79, 0x3C, 0xBF, 0x45, 0x59, 0xB9, 0xFD, 0xE3, 0x8A, 0xB2, 0x2D,
|
||||
0xF1, 0x68, 0x69, 0xF6, 0x98, 0x81, 0xAE, 0x14, 0xC4, 0xB0, 0x13,
|
||||
0x9A, 0xC7, 0x88, 0xA7, 0x8A, 0x1A, 0xFC, 0xCA, 0x02, 0xFB },
|
||||
"MIGNMQswCQYDVQQGEwJBVDFIMEYGA1UECgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hl"
|
||||
"cmhlaXRzc3lzdGVtZSBpbSBlbGVrdHIuIERhdGVudmVya2VociBHbWJIMRkwFwYD"
|
||||
"VQQLDBBBLVRydXN0LW5RdWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5RdWFsLTAz",
|
||||
|
@ -658,8 +702,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.7879.13.24.1",
|
||||
"T-Systems EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x55, 0xA6, 0x72, 0x3E, 0xCB, 0xF2, 0xEC, 0xCD, 0xC3, 0x23,
|
||||
0x74, 0x70, 0x19, 0x9D, 0x2A, 0xBE, 0x11, 0xE3, 0x81, 0xD1 },
|
||||
{ 0xFD, 0x73, 0xDA, 0xD3, 0x1C, 0x64, 0x4F, 0xF1, 0xB4, 0x3B, 0xEF,
|
||||
0x0C, 0xCD, 0xDA, 0x96, 0x71, 0x0B, 0x9C, 0xD9, 0x87, 0x5E, 0xCA,
|
||||
0x7E, 0x31, 0x70, 0x7A, 0xF3, 0xE9, 0x6D, 0x52, 0x2B, 0xBD },
|
||||
"MIGCMQswCQYDVQQGEwJERTErMCkGA1UECgwiVC1TeXN0ZW1zIEVudGVycHJpc2Ug"
|
||||
"U2VydmljZXMgR21iSDEfMB0GA1UECwwWVC1TeXN0ZW1zIFRydXN0IENlbnRlcjEl"
|
||||
"MCMGA1UEAwwcVC1UZWxlU2VjIEdsb2JhbFJvb3QgQ2xhc3MgMw==",
|
||||
|
@ -671,8 +716,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.792.3.0.3.1.1.5",
|
||||
"TurkTrust EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xF1, 0x7F, 0x6F, 0xB6, 0x31, 0xDC, 0x99, 0xE3, 0xA3, 0xC8,
|
||||
0x7F, 0xFE, 0x1C, 0xF1, 0x81, 0x10, 0x88, 0xD9, 0x60, 0x33 },
|
||||
{ 0x97, 0x8C, 0xD9, 0x66, 0xF2, 0xFA, 0xA0, 0x7B, 0xA7, 0xAA, 0x95,
|
||||
0x00, 0xD9, 0xC0, 0x2E, 0x9D, 0x77, 0xF2, 0xCD, 0xAD, 0xA6, 0xAD,
|
||||
0x6B, 0xA7, 0x4A, 0xF4, 0xB9, 0x1C, 0x66, 0x59, 0x3C, 0x50 },
|
||||
"MIG/MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsgU2VydGlmaWthIEhp"
|
||||
"em1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmth"
|
||||
"cmExXjBcBgNVBAoMVVTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBCaWxp"
|
||||
|
@ -686,8 +732,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.29836.1.10",
|
||||
"CNNIC EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x4F, 0x99, 0xAA, 0x93, 0xFB, 0x2B, 0xD1, 0x37, 0x26, 0xA1,
|
||||
0x99, 0x4A, 0xCE, 0x7F, 0xF0, 0x05, 0xF2, 0x93, 0x5D, 0x1E },
|
||||
{ 0x1C, 0x01, 0xC6, 0xF4, 0xDB, 0xB2, 0xFE, 0xFC, 0x22, 0x55, 0x8B,
|
||||
0x2B, 0xCA, 0x32, 0x56, 0x3F, 0x49, 0x84, 0x4A, 0xCF, 0xC3, 0x2B,
|
||||
0x7B, 0xE4, 0xB0, 0xFF, 0x59, 0x9F, 0x9E, 0x8C, 0x7A, 0xF7 },
|
||||
"MIGKMQswCQYDVQQGEwJDTjEyMDAGA1UECgwpQ2hpbmEgSW50ZXJuZXQgTmV0d29y"
|
||||
"ayBJbmZvcm1hdGlvbiBDZW50ZXIxRzBFBgNVBAMMPkNoaW5hIEludGVybmV0IE5l"
|
||||
"dHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyIEVWIENlcnRpZmljYXRlcyBSb290",
|
||||
|
@ -699,8 +746,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.40869.1.1.22.3",
|
||||
"TWCA EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xCF, 0x9E, 0x87, 0x6D, 0xD3, 0xEB, 0xFC, 0x42, 0x26, 0x97,
|
||||
0xA3, 0xB5, 0xA3, 0x7A, 0xA0, 0x76, 0xA9, 0x06, 0x23, 0x48 },
|
||||
{ 0xBF, 0xD8, 0x8F, 0xE1, 0x10, 0x1C, 0x41, 0xAE, 0x3E, 0x80, 0x1B,
|
||||
0xF8, 0xBE, 0x56, 0x35, 0x0E, 0xE9, 0xBA, 0xD1, 0xA6, 0xB9, 0xBD,
|
||||
0x51, 0x5E, 0xDC, 0x5C, 0x6D, 0x5B, 0x87, 0x11, 0xAC, 0x44 },
|
||||
"MF8xCzAJBgNVBAYTAlRXMRIwEAYDVQQKDAlUQUlXQU4tQ0ExEDAOBgNVBAsMB1Jv"
|
||||
"b3QgQ0ExKjAoBgNVBAMMIVRXQ0EgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0"
|
||||
"eQ==",
|
||||
|
@ -712,8 +760,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.4788.2.202.1",
|
||||
"D-TRUST EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x96, 0xC9, 0x1B, 0x0B, 0x95, 0xB4, 0x10, 0x98, 0x42, 0xFA,
|
||||
0xD0, 0xD8, 0x22, 0x79, 0xFE, 0x60, 0xFA, 0xB9, 0x16, 0x83 },
|
||||
{ 0xEE, 0xC5, 0x49, 0x6B, 0x98, 0x8C, 0xE9, 0x86, 0x25, 0xB9, 0x34,
|
||||
0x09, 0x2E, 0xEC, 0x29, 0x08, 0xBE, 0xD0, 0xB0, 0xF3, 0x16, 0xC2,
|
||||
0xD4, 0x73, 0x0C, 0x84, 0xEA, 0xF1, 0xF3, 0xD3, 0x48, 0x81 },
|
||||
"MFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxKjAoBgNVBAMM"
|
||||
"IUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAwOQ==",
|
||||
"CYP0",
|
||||
|
@ -724,8 +773,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.756.1.83.21.0",
|
||||
"Swisscom EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xE7, 0xA1, 0x90, 0x29, 0xD3, 0xD5, 0x52, 0xDC, 0x0D, 0x0F,
|
||||
0xC6, 0x92, 0xD3, 0xEA, 0x88, 0x0D, 0x15, 0x2E, 0x1A, 0x6B },
|
||||
{ 0xD9, 0x5F, 0xEA, 0x3C, 0xA4, 0xEE, 0xDC, 0xE7, 0x4C, 0xD7, 0x6E,
|
||||
0x75, 0xFC, 0x6D, 0x1F, 0xF6, 0x2C, 0x44, 0x1F, 0x0F, 0xA8, 0xBC,
|
||||
0x77, 0xF0, 0x34, 0xB1, 0x9E, 0x5D, 0xB2, 0x58, 0x01, 0x5D },
|
||||
"MGcxCzAJBgNVBAYTAmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGln"
|
||||
"aXRhbCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEeMBwGA1UEAxMVU3dpc3Njb20gUm9v"
|
||||
"dCBFViBDQSAy",
|
||||
|
@ -737,8 +787,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.113733.1.7.23.6",
|
||||
"VeriSign EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x36, 0x79, 0xCA, 0x35, 0x66, 0x87, 0x72, 0x30, 0x4D, 0x30,
|
||||
0xA5, 0xFB, 0x87, 0x3B, 0x0F, 0xA7, 0x7B, 0xB7, 0x0D, 0x54 },
|
||||
{ 0x23, 0x99, 0x56, 0x11, 0x27, 0xA5, 0x71, 0x25, 0xDE, 0x8C, 0xEF,
|
||||
0xEA, 0x61, 0x0D, 0xDF, 0x2F, 0xA0, 0x78, 0xB5, 0xC8, 0x06, 0x7F,
|
||||
0x4E, 0x82, 0x82, 0x90, 0xBF, 0xB8, 0x60, 0xE8, 0x4B, 0x3C },
|
||||
"MIG9MQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNV"
|
||||
"BAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAyMDA4IFZl"
|
||||
"cmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxODA2BgNVBAMT"
|
||||
|
@ -751,8 +802,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.14370.1.6",
|
||||
"GeoTrust EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x03, 0x9E, 0xED, 0xB8, 0x0B, 0xE7, 0xA0, 0x3C, 0x69, 0x53,
|
||||
0x89, 0x3B, 0x20, 0xD2, 0xD9, 0x32, 0x3A, 0x4C, 0x2A, 0xFD },
|
||||
{ 0xB4, 0x78, 0xB8, 0x12, 0x25, 0x0D, 0xF8, 0x78, 0x63, 0x5C, 0x2A,
|
||||
0xA7, 0xEC, 0x7D, 0x15, 0x5E, 0xAA, 0x62, 0x5E, 0xE8, 0x29, 0x16,
|
||||
0xE2, 0xCD, 0x29, 0x43, 0x61, 0x88, 0x6C, 0xD1, 0xFB, 0xD4 },
|
||||
"MIGYMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjE5MDcGA1UE"
|
||||
"CxMwKGMpIDIwMDggR2VvVHJ1c3QgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBv"
|
||||
"bmx5MTYwNAYDVQQDEy1HZW9UcnVzdCBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0"
|
||||
|
@ -765,8 +817,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.840.1.113733.1.7.48.1",
|
||||
"Thawte EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xF1, 0x8B, 0x53, 0x8D, 0x1B, 0xE9, 0x03, 0xB6, 0xA6, 0xF0,
|
||||
0x56, 0x43, 0x5B, 0x17, 0x15, 0x89, 0xCA, 0xF3, 0x6B, 0xF2 },
|
||||
{ 0x4B, 0x03, 0xF4, 0x58, 0x07, 0xAD, 0x70, 0xF2, 0x1B, 0xFC, 0x2C,
|
||||
0xAE, 0x71, 0xC9, 0xFD, 0xE4, 0x60, 0x4C, 0x06, 0x4C, 0xF5, 0xFF,
|
||||
0xB6, 0x86, 0xBA, 0xE5, 0xDB, 0xAA, 0xD7, 0xFD, 0xD3, 0x4C },
|
||||
"MIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3RlLCBJbmMuMSgwJgYDVQQL"
|
||||
"Ex9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYDVQQLEy8oYykg"
|
||||
"MjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG"
|
||||
|
@ -779,8 +832,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.13177.10.1.3.10",
|
||||
"Firmaprofesional EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0xAE, 0xC5, 0xFB, 0x3F, 0xC8, 0xE1, 0xBF, 0xC4, 0xE5, 0x4F,
|
||||
0x03, 0x07, 0x5A, 0x9A, 0xE8, 0x00, 0xB7, 0xF7, 0xB6, 0xFA },
|
||||
{ 0x04, 0x04, 0x80, 0x28, 0xBF, 0x1F, 0x28, 0x64, 0xD4, 0x8F, 0x9A,
|
||||
0xD4, 0xD8, 0x32, 0x94, 0x36, 0x6A, 0x82, 0x88, 0x56, 0x55, 0x3F,
|
||||
0x3B, 0x14, 0x30, 0x3F, 0x90, 0x14, 0x7F, 0x5D, 0x40, 0xEF },
|
||||
"MFExCzAJBgNVBAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNh"
|
||||
"Y2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBBNjI2MzQwNjg=",
|
||||
"U+w77vuySF8=",
|
||||
|
@ -791,8 +845,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"1.3.6.1.4.1.40869.1.1.22.3",
|
||||
"TWCA EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x9C, 0xBB, 0x48, 0x53, 0xF6, 0xA4, 0xF6, 0xD3, 0x52, 0xA4,
|
||||
0xE8, 0x32, 0x52, 0x55, 0x60, 0x13, 0xF5, 0xAD, 0xAF, 0x65 },
|
||||
{ 0x59, 0x76, 0x90, 0x07, 0xF7, 0x68, 0x5D, 0x0F, 0xCD, 0x50, 0x87,
|
||||
0x2F, 0x9F, 0x95, 0xD5, 0x75, 0x5A, 0x5B, 0x2B, 0x45, 0x7D, 0x81,
|
||||
0xF3, 0x69, 0x2B, 0x61, 0x0A, 0x98, 0x67, 0x2F, 0x0E, 0x1B },
|
||||
"MFExCzAJBgNVBAYTAlRXMRIwEAYDVQQKEwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jv"
|
||||
"b3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3QgQ0E=",
|
||||
"DL4=",
|
||||
|
@ -803,8 +858,9 @@ static struct nsMyTrustedEVInfo myTrustedEVInfos[] = {
|
|||
"2.16.792.3.0.4.1.1.4",
|
||||
"ETugra EV OID",
|
||||
SEC_OID_UNKNOWN,
|
||||
{ 0x51, 0xC6, 0xE7, 0x08, 0x49, 0x06, 0x6E, 0xF3, 0x92, 0xD4,
|
||||
0x5C, 0xA0, 0x0D, 0x6D, 0xA3, 0x62, 0x8F, 0xC3, 0x52, 0x39 },
|
||||
{ 0xB0, 0xBF, 0xD5, 0x2B, 0xB0, 0xD7, 0xD9, 0xBD, 0x92, 0xBF, 0x5D,
|
||||
0x4D, 0xC1, 0x3D, 0xA2, 0x55, 0xC0, 0x2C, 0x54, 0x2F, 0x37, 0x83,
|
||||
0x65, 0xEA, 0x89, 0x39, 0x11, 0xF5, 0x5E, 0x55, 0xF2, 0x3C },
|
||||
"MIGyMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMUAwPgYDVQQKDDdFLVR1"
|
||||
"xJ9yYSBFQkcgQmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXptZXRsZXJpIEEu"
|
||||
"xZ4uMSYwJAYDVQQLDB1FLVR1Z3JhIFNlcnRpZmlrYXN5b24gTWVya2V6aTEoMCYG"
|
||||
|
@ -946,13 +1002,14 @@ IdentityInfoInit()
|
|||
continue;
|
||||
}
|
||||
|
||||
unsigned char certFingerprint[20];
|
||||
rv = PK11_HashBuf(SEC_OID_SHA1, certFingerprint,
|
||||
unsigned char certFingerprint[SHA256_LENGTH];
|
||||
rv = PK11_HashBuf(SEC_OID_SHA256, certFingerprint,
|
||||
entry.cert->derCert.data,
|
||||
static_cast<int32_t>(entry.cert->derCert.len));
|
||||
PR_ASSERT(rv == SECSuccess);
|
||||
if (rv == SECSuccess) {
|
||||
bool same = !memcmp(certFingerprint, entry.ev_root_sha1_fingerprint, 20);
|
||||
bool same = !memcmp(certFingerprint, entry.ev_root_sha256_fingerprint,
|
||||
sizeof(certFingerprint));
|
||||
PR_ASSERT(same);
|
||||
if (same) {
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ config = {
|
|||
|
||||
"reftest_options": [
|
||||
"--desktop", "--profile=%(gaia_profile)s", "--appname=%(application)s",
|
||||
"--total-chunks=%(total_chunks)s", "--this-chunk=%(this_chunk)s",
|
||||
"--browser-arg=%(browser_arg)s", "--symbols-path=%(symbols_path)s",
|
||||
"%(test_manifest)s"
|
||||
]
|
||||
|
|
|
@ -481,9 +481,19 @@ class MochitestUtilsMixin(object):
|
|||
info[k] = v
|
||||
|
||||
# Bug 883858 - return all tests including disabled tests
|
||||
tests = manifest.active_tests(disabled=True, options=options, **info)
|
||||
paths = []
|
||||
testPath = self.getTestPath(options)
|
||||
if testPath.endswith('.html') or \
|
||||
testPath.endswith('.xhtml') or \
|
||||
testPath.endswith('.xul') or \
|
||||
testPath.endswith('.js'):
|
||||
# In the case where we have a single file, we don't want to filter based on options such as subsuite.
|
||||
tests = manifest.active_tests(disabled=True, options=None, **info)
|
||||
for test in tests:
|
||||
if 'disabled' in test:
|
||||
del test['disabled']
|
||||
else:
|
||||
tests = manifest.active_tests(disabled=True, options=options, **info)
|
||||
paths = []
|
||||
|
||||
for test in tests:
|
||||
pathAbs = os.path.abspath(test['path'])
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
import argparse
|
||||
import sys
|
||||
import traceback
|
||||
import types
|
||||
|
||||
from mozlog.structured import structuredlog, commandline
|
||||
|
||||
class TestAssertion(Exception):
|
||||
pass
|
||||
|
||||
def assert_equals(a, b):
|
||||
if a != b:
|
||||
raise TestAssertion("%r not equal to %r" % (a, b))
|
||||
|
||||
def expected(status):
|
||||
def inner(f):
|
||||
def test_func():
|
||||
f()
|
||||
test_func.__name__ = f.__name__
|
||||
test_func._expected = status
|
||||
return test_func
|
||||
return inner
|
||||
|
||||
def test_that_passes():
|
||||
assert_equals(1, int("1"))
|
||||
|
||||
def test_that_fails():
|
||||
assert_equals(1, int("2"))
|
||||
|
||||
def test_that_has_an_error():
|
||||
assert_equals(2, 1 + "1")
|
||||
|
||||
@expected("FAIL")
|
||||
def test_expected_fail():
|
||||
assert_equals(2 + 2, 5)
|
||||
|
||||
class TestRunner(object):
|
||||
def __init__(self, logger):
|
||||
self.logger = logger
|
||||
|
||||
def gather_tests(self):
|
||||
for item in globals().itervalues():
|
||||
if type(item) == types.FunctionType and item.__name__.startswith("test_"):
|
||||
yield item.__name__, item
|
||||
|
||||
def run(self):
|
||||
tests = list(self.gather_tests())
|
||||
|
||||
self.logger.suite_start(tests=[name for name, func in tests])
|
||||
self.logger.info("Running tests")
|
||||
for name, func in tests:
|
||||
self.run_test(name, func)
|
||||
self.logger.suite_end()
|
||||
|
||||
def run_test(self, name, func):
|
||||
self.logger.test_start(name)
|
||||
status = None
|
||||
message = None
|
||||
expected = func._expected if hasattr(func, "_expected") else "PASS"
|
||||
try:
|
||||
func()
|
||||
except TestAssertion as e:
|
||||
status = "FAIL"
|
||||
message = e.message
|
||||
except:
|
||||
status = "ERROR"
|
||||
message = traceback.format_exc()
|
||||
else:
|
||||
status = "PASS"
|
||||
self.logger.test_end(name, status=status, expected=expected, message=message)
|
||||
|
||||
def get_parser():
|
||||
parser = argparse.ArgumentParser()
|
||||
return parser
|
||||
|
||||
def main():
|
||||
parser = get_parser()
|
||||
commandline.add_logging_group(parser)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
logger = commandline.setup_logging("structured-example", args, {"raw": sys.stdout})
|
||||
|
||||
runner = TestRunner(logger)
|
||||
try:
|
||||
runner.run()
|
||||
except:
|
||||
logger.critical("Error during test run:\n%s" % traceback.format_exc())
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -1,10 +1,14 @@
|
|||
:mod:`mozlog.structured` --- Structured logging for test output
|
||||
===============================================================
|
||||
|
||||
``mozlog.structured`` is a library designed for logging the execution
|
||||
and results of test harnesses. The canonical output format is JSON,
|
||||
with one line of JSON per log entry. It is *not* based on the stdlib
|
||||
logging module, although it shares several concepts with this module.
|
||||
:py:mod:`mozlog.structured` is a library designed for logging the
|
||||
execution and results of test harnesses. The internal data model is a
|
||||
stream of JSON-compatible objects, with one object per log entry. The
|
||||
default output format is line-based, with one JSON object serialized
|
||||
per line.
|
||||
|
||||
:py:mod:`mozlog.structured` is *not* based on the stdlib logging
|
||||
module, although it shares several concepts with it.
|
||||
|
||||
One notable difference between this module and the standard logging
|
||||
module is the way that loggers are created. The structured logging
|
||||
|
@ -12,7 +16,7 @@ module does not require that loggers with a specific name are
|
|||
singleton objects accessed through a factory function. Instead the
|
||||
``StructuredLogger`` constructor may be used directly. However all
|
||||
loggers with the same name share the same internal state (the "Borg"
|
||||
pattern). In particular the list of handlers functions is the same for
|
||||
pattern). In particular the list of handler functions is the same for
|
||||
all loggers with the same name.
|
||||
|
||||
Logging is threadsafe, with access to handlers protected by a
|
||||
|
@ -55,7 +59,11 @@ emitted:
|
|||
Emitted when the testsuite starts running.
|
||||
|
||||
``tests``
|
||||
A list of test_ids (list).
|
||||
A list of test ids. Test ids can either be strings or lists of
|
||||
strings (an example of the latter is reftests where the id has the
|
||||
form [test_url, ref_type, ref_url]) and are assumed to be unique
|
||||
within a given testsuite. In cases where the test list is not
|
||||
known upfront an empty list may be passed (list).
|
||||
|
||||
``run_info``
|
||||
An optional dictionary describing the properties of the
|
||||
|
@ -74,7 +82,7 @@ emitted:
|
|||
|
||||
``test_status``
|
||||
Emitted for a test which has subtests to record the result of a
|
||||
single subtest
|
||||
single subtest.
|
||||
|
||||
``test``
|
||||
The same unique id for the test as in the ``test_start`` message.
|
||||
|
@ -105,7 +113,7 @@ emitted:
|
|||
``CRASH``, ``ASSERT``, ``SKIP``).
|
||||
|
||||
``expected``
|
||||
The expected status, or emitted if the expected status matches the
|
||||
The expected status, or omitted if the expected status matches the
|
||||
actual status (string enum, same as ``status``).
|
||||
|
||||
``process_output``
|
||||
|
@ -131,6 +139,55 @@ emitted:
|
|||
``message``
|
||||
Text of the log message.
|
||||
|
||||
Testsuite Protocol
|
||||
------------------
|
||||
|
||||
When used for testsuites, the following structured logging messages must be emitted:
|
||||
|
||||
* One ``suite_start`` message before any ``test_*`` messages
|
||||
|
||||
* One ``test_start`` message per test that is run
|
||||
|
||||
* One ``test_status`` message per subtest that is run. This might be
|
||||
zero if the test type doesn't have the notion of subtests.
|
||||
|
||||
* One ``test_end`` message per test that is run, after the
|
||||
``test_start`` and any ``test_status`` messages for that same test.
|
||||
|
||||
* One ``suite_end`` message after all ``test_*`` messages have been
|
||||
emitted.
|
||||
|
||||
The above mandatory events may be interspersed with ``process_output``
|
||||
and ``log`` events, as required.
|
||||
|
||||
Subtests
|
||||
~~~~~~~~
|
||||
|
||||
The purpose of subtests is to deal with situations where a single test
|
||||
produces more than one result, and the exact details of the number of
|
||||
results is not known ahead of time. For example consider a test
|
||||
harness that loads JavaScript-based tests in a browser. Each url
|
||||
loaded would be a single test, with corresponding ``test_start`` and
|
||||
``test_end`` messages. If there can be more than one JS-defined test
|
||||
on a page, however, it it useful to track the results of those tests
|
||||
seperately. Therefore each of those tests is a subtest, and one
|
||||
``test_status`` message must be generated for each subtest result.
|
||||
|
||||
Subtests must have a name that is unique within their parent test.
|
||||
|
||||
Whether or not a test has subtests changes the meaning of the
|
||||
``status`` property on the test itself. When the test does not have
|
||||
any subtests, this property is the actual test result such as ``PASS``
|
||||
or ``FAIL`` . When a test does have subtests, the test itself does not
|
||||
have a result as-such; it isn't meaningful to describe it as having a
|
||||
``PASS`` result, especially if the subtests did not all pass. Instead
|
||||
this property is used to hold information about whether the test ran
|
||||
without error. If no errors were detected the test must be given the
|
||||
status ``OK``. Otherwise the test may get the status ``ERROR`` (for
|
||||
e.g. uncaught JS exceptions), ``TIMEOUT`` (if no results were reported
|
||||
in the allowed time) or ``CRASH`` (if the test caused the process
|
||||
under test to crash).
|
||||
|
||||
StructuredLogger Objects
|
||||
------------------------
|
||||
|
||||
|
@ -220,13 +277,13 @@ The `mozlog.structured.commandline` module provides integration with
|
|||
the `argparse` module to provide uniform logging-related command line
|
||||
arguments to programs using `mozlog.structured`. Each known formatter
|
||||
gets a command line argument of the form ``--log-{name}``, which takes
|
||||
the name of a file to log to with that format of `-` to indicate stdout.
|
||||
the name of a file to log to with that format, or ``-`` to indicate stdout.
|
||||
|
||||
.. automodule:: mozlog.structured.commandline
|
||||
:members:
|
||||
|
||||
Examples
|
||||
--------
|
||||
Simple Examples
|
||||
---------------
|
||||
|
||||
Log to stdout::
|
||||
|
||||
|
@ -261,7 +318,7 @@ Count the number of tests that timed out in a testsuite::
|
|||
|
||||
from mozlog.structured import reader
|
||||
|
||||
count = 0;
|
||||
count = 0
|
||||
|
||||
def handle_test_end(data):
|
||||
global count
|
||||
|
@ -272,3 +329,117 @@ Count the number of tests that timed out in a testsuite::
|
|||
{"test_end": handle_test_end})
|
||||
|
||||
print count
|
||||
|
||||
More Complete Example
|
||||
---------------------
|
||||
|
||||
This example shows a complete toy testharness set up to used
|
||||
structured logging. It is avaliable as `structured_example.py <_static/structured_example.py>`_:
|
||||
|
||||
.. literalinclude:: _static/structured_example.py
|
||||
|
||||
Each global function with a name starting
|
||||
``test_`` represents a test. A passing test returns without
|
||||
throwing. A failing test throws a :py:class:`TestAssertion` exception
|
||||
via the :py:func:`assert_equals` function. Throwing anything else is
|
||||
considered an error in the test. There is also a :py:func:`expected`
|
||||
decorator that is used to annotate tests that are expected to do
|
||||
something other than pass.
|
||||
|
||||
The main entry point to the test runner is via that :py:func:`main`
|
||||
function. This is responsible for parsing command line
|
||||
arguments, and initiating the test run. Although the test harness
|
||||
itself does not provide any command line arguments, the
|
||||
:py:class:`ArgumentParser` object is populated by
|
||||
:py:meth:`commandline.add_logging_group`, which provides a generic
|
||||
set of structured logging arguments appropriate to all tools producing
|
||||
structured logging.
|
||||
|
||||
The values of these command line arguments are used to create a
|
||||
:py:class:`mozlog.structured.StructuredLogger` object populated with the
|
||||
specified handlers and formatters in
|
||||
:py:func:`commandline.setup_logging`. The third argument to this
|
||||
function is the default arguments to use. In this case the default
|
||||
is to output raw (i.e. JSON-formatted) logs to stdout.
|
||||
|
||||
The main test harness is provided by the :py:class:`TestRunner`
|
||||
class. This class is responsible for scheduling all the tests and
|
||||
logging all the results. It is passed the :py:obj:`logger` object
|
||||
created from the command line arguments. The :py:meth:`run` method
|
||||
starts the test run. Before the run is started it logs a
|
||||
``suite_start`` message containing the id of each test that will run,
|
||||
and after the testrun is done it logs a ``suite_end`` message.
|
||||
|
||||
Individual tests are run in the :py:meth:`run_test` method. For each
|
||||
test this logs a ``test_start`` message. It then runs the test and
|
||||
logs a ``test_end`` message containing the test name, status, expected
|
||||
status, and any informational message about the reason for the
|
||||
result. In this test harness there are no subtests, so the
|
||||
``test_end`` message has the status of the test and there are no
|
||||
``test_status`` messages.
|
||||
|
||||
Example Output
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
When run without providing any command line options, the raw
|
||||
structured log messages are sent to stdout::
|
||||
|
||||
$ python structured_example.py
|
||||
|
||||
{"source": "structured-example", "tests": ["test_that_has_an_error", "test_that_fails", "test_expected_fail", "test_that_passes"], "thread": "MainThread", "time": 1401446682787, "action": "suite_start", "pid": 18456}
|
||||
{"source": "structured-example", "thread": "MainThread", "time": 1401446682787, "action": "log", "message": "Running tests", "level": "INFO", "pid": 18456}
|
||||
{"source": "structured-example", "test": "test_that_has_an_error", "thread": "MainThread", "time": 1401446682787, "action": "test_start", "pid": 18456}
|
||||
{"status": "ERROR", "thread": "MainThread", "pid": 18456, "source": "structured-example", "test": "test_that_has_an_error", "time": 1401446682788, "action": "test_end", "message": "Traceback (most recent call last):\n File \"structured_example.py\", line 61, in run_test\n func()\n File \"structured_example.py\", line 31, in test_that_has_an_error\n assert_equals(2, 1 + \"1\")\nTypeError: unsupported operand type(s) for +: 'int' and 'str'\n", "expected": "PASS"}
|
||||
{"source": "structured-example", "test": "test_that_fails", "thread": "MainThread", "time": 1401446682788, "action": "test_start", "pid": 18456}
|
||||
{"status": "FAIL", "thread": "MainThread", "pid": 18456, "source": "structured-example", "test": "test_that_fails", "time": 1401446682788, "action": "test_end", "message": "1 not equal to 2", "expected": "PASS"}
|
||||
{"source": "structured-example", "test": "test_expected_fail", "thread": "MainThread", "time": 1401446682788, "action": "test_start", "pid": 18456}
|
||||
{"status": "FAIL", "thread": "MainThread", "pid": 18456, "source": "structured-example", "test": "test_expected_fail", "time": 1401446682788, "action": "test_end", "message": "4 not equal to 5"}
|
||||
{"source": "structured-example", "test": "test_that_passes", "thread": "MainThread", "time": 1401446682788, "action": "test_start", "pid": 18456}
|
||||
{"status": "PASS", "source": "structured-example", "test": "test_that_passes", "thread": "MainThread", "time": 1401446682789, "action": "test_end", "pid": 18456}
|
||||
{"action": "suite_end", "source": "structured-example", "pid": 18456, "thread": "MainThread", "time": 1401446682789}
|
||||
|
||||
The structured logging module provides a number of command line
|
||||
options::
|
||||
|
||||
$ python structured_example.py --help
|
||||
|
||||
usage: structured_example.py [-h] [--log-unittest LOG_UNITTEST]
|
||||
[--log-raw LOG_RAW] [--log-html LOG_HTML]
|
||||
[--log-xunit LOG_XUNIT]
|
||||
[--log-mach_terminal LOG_MACH_TERMINAL]
|
||||
[--log-mach LOG_MACH]
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
|
||||
Output Logging:
|
||||
Options for logging output. Each option represents a possible logging
|
||||
format and takes a filename to write that format to, or '-' to write to
|
||||
stdout.
|
||||
|
||||
--log-unittest LOG_UNITTEST
|
||||
Unittest style output
|
||||
--log-raw LOG_RAW Raw structured log messages
|
||||
--log-html LOG_HTML HTML report
|
||||
--log-xunit LOG_XUNIT
|
||||
xUnit compatible XML
|
||||
--log-mach_terminal LOG_MACH_TERMINAL
|
||||
Colored mach-like output for use in a tty
|
||||
--log-mach LOG_MACH Uncolored mach-like output
|
||||
|
||||
In order to get human-readable output on stdout and the structured log
|
||||
data to go to the file ``structured.log``, we would run::
|
||||
|
||||
$ python structured_example.py --log-mach=- --log-raw=structured.log
|
||||
|
||||
0:00.00 SUITE_START: MainThread 4
|
||||
0:01.00 LOG: MainThread INFO Running tests
|
||||
0:01.00 TEST_START: MainThread test_that_has_an_error
|
||||
0:01.00 TEST_END: MainThread Harness status ERROR, expected PASS. Subtests passed 0/0. Unexpected 1
|
||||
0:01.00 TEST_START: MainThread test_that_fails
|
||||
0:01.00 TEST_END: MainThread Harness status FAIL, expected PASS. Subtests passed 0/0. Unexpected 1
|
||||
0:01.00 TEST_START: MainThread test_expected_fail
|
||||
0:02.00 TEST_END: MainThread Harness status FAIL. Subtests passed 0/0. Unexpected 0
|
||||
0:02.00 TEST_START: MainThread test_that_passes
|
||||
0:02.00 TEST_END: MainThread Harness status PASS. Subtests passed 0/0. Unexpected 0
|
||||
0:02.00 SUITE_END: MainThread
|
||||
|
|
|
@ -25,6 +25,7 @@ def do_defered_imports():
|
|||
|
||||
|
||||
class HTMLFormatter(base.BaseFormatter):
|
||||
"""Formatter that produces a simple HTML-formatted report."""
|
||||
def __init__(self):
|
||||
do_defered_imports()
|
||||
self.suite_name = None
|
||||
|
|
|
@ -23,7 +23,7 @@ class BaseHandler(object):
|
|||
|
||||
|
||||
class LogLevelFilter(object):
|
||||
"""Handler that filters out messages with action:log and a level
|
||||
"""Handler that filters out messages with action of log and a level
|
||||
lower than some specified level.
|
||||
|
||||
:param inner: Handler to use for messages that pass this filter
|
||||
|
|
|
@ -2328,6 +2328,14 @@
|
|||
"n_buckets": 20,
|
||||
"description": "Time spent loading plugin DLL and obtaining metadata (ms)"
|
||||
},
|
||||
"PLUGIN_STARTUP_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": "5000",
|
||||
"n_buckets": 20,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Time spent starting up plugins (ms)"
|
||||
},
|
||||
"PLUGIN_SHUTDOWN_MS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
|
|
|
@ -168,7 +168,11 @@ EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
|
|||
endif
|
||||
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
ifdef MOZ_ENABLE_GTK3
|
||||
EXTRA_DSO_LDOPTS += $(filter-out -lgtk-3 -lgdk-3,$(TK_LIBS)) -lmozgtk_stub
|
||||
else
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(XT_LIBS) -lgthread-2.0
|
||||
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
||||
endif
|
||||
|
|
|
@ -279,21 +279,28 @@ static inline void profiler_tracing(const char* aCategory, const char* aInfo,
|
|||
// ac_add_options --enable-systace
|
||||
//#define MOZ_USE_SYSTRACE
|
||||
#ifdef MOZ_USE_SYSTRACE
|
||||
# define ATRACE_TAG ATRACE_TAG_GRAPHICS
|
||||
# define ATRACE_TAG ATRACE_TAG_ALWAYS
|
||||
// We need HAVE_ANDROID_OS to be defined for Trace.h.
|
||||
// If its not set we will set it temporary and remove it.
|
||||
# ifndef HAVE_ANDROID_OS
|
||||
# define HAVE_ANDROID_OS
|
||||
# define REMOVE_HAVE_ANDROID_OS
|
||||
# endif
|
||||
// Android source code will include <cutils/trace.h> before this. There is no
|
||||
// HAVE_ANDROID_OS defined in Firefox OS build at that time. Enabled it globally
|
||||
// will cause other build break. So atrace_begin and atrace_end are not defined.
|
||||
// It will cause a build-break when we include <utils/Trace.h>. Use undef
|
||||
// _LIBS_CUTILS_TRACE_H will force <cutils/trace.h> to define atrace_begin and
|
||||
// atrace_end with defined HAVE_ANDROID_OS again. Then there is no build-break.
|
||||
# undef _LIBS_CUTILS_TRACE_H
|
||||
# include <utils/Trace.h>
|
||||
# define MOZ_PLATFORM_TRACING ATRACE_CALL();
|
||||
# define MOZ_PLATFORM_TRACING(name) ATRACE_NAME(name);
|
||||
# ifdef REMOVE_HAVE_ANDROID_OS
|
||||
# undef HAVE_ANDROID_OS
|
||||
# undef REMOVE_HAVE_ANDROID_OS
|
||||
# endif
|
||||
#else
|
||||
# define MOZ_PLATFORM_TRACING
|
||||
# define MOZ_PLATFORM_TRACING(name)
|
||||
#endif
|
||||
|
||||
// we want the class and function name but can't easily get that using preprocessor macros
|
||||
|
@ -303,8 +310,8 @@ static inline void profiler_tracing(const char* aCategory, const char* aInfo,
|
|||
#define SAMPLER_APPEND_LINE_NUMBER_EXPAND(id, line) SAMPLER_APPEND_LINE_NUMBER_PASTE(id, line)
|
||||
#define SAMPLER_APPEND_LINE_NUMBER(id) SAMPLER_APPEND_LINE_NUMBER_EXPAND(id, __LINE__)
|
||||
|
||||
#define PROFILER_LABEL(name_space, info) MOZ_PLATFORM_TRACING mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__)
|
||||
#define PROFILER_LABEL_PRINTF(name_space, info, ...) MOZ_PLATFORM_TRACING mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__, __VA_ARGS__)
|
||||
#define PROFILER_LABEL(name_space, info) MOZ_PLATFORM_TRACING(name_space "::" info) mozilla::SamplerStackFrameRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__)
|
||||
#define PROFILER_LABEL_PRINTF(name_space, info, ...) MOZ_PLATFORM_TRACING(name_space "::" info) mozilla::SamplerStackFramePrintfRAII SAMPLER_APPEND_LINE_NUMBER(sampler_raii)(name_space "::" info, __LINE__, __VA_ARGS__)
|
||||
|
||||
#define PROFILER_MARKER(info) mozilla_sampler_add_marker(info)
|
||||
#define PROFILER_MARKER_PAYLOAD(info, payload) mozilla_sampler_add_marker(info, payload)
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче