Issue #2503 - Part 1: add CPU IS support flags to Navigator interface

This commit is contained in:
Moonchild 2024-04-14 20:47:17 +02:00 committed by roytam1
commit 35d7a1fe5a
3 changed files with 18 additions and 0 deletions

View file

@ -678,6 +678,18 @@ Navigator::CpuHasSSE2()
return mozilla::supports_sse2();
}
bool
Navigator::CpuHasAVX()
{
return mozilla::supports_avx();
}
bool
Navigator::CpuHasAVX2()
{
return mozilla::supports_avx2();
}
void
Navigator::RefreshMIMEArray()
{

View file

@ -173,6 +173,8 @@ public:
bool JavaEnabled(ErrorResult& aRv);
uint64_t HardwareConcurrency();
bool CpuHasSSE2();
bool CpuHasAVX();
bool CpuHasAVX2();
bool TaintEnabled()
{
return false;

View file

@ -211,6 +211,10 @@ partial interface Navigator {
*/
[ChromeOnly]
readonly attribute boolean cpuHasSSE2;
[ChromeOnly]
readonly attribute boolean cpuHasAVX;
[ChromeOnly]
readonly attribute boolean cpuHasAVX2;
};
// nsIDOMNavigatorDesktopNotification