diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-02-20 10:25:50 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-20 10:25:50 +0100 |
commit | 437a613e6e72d790af1826391976d05463d604a7 (patch) | |
tree | 0cd5d9744f4595a2d4c1064d185e83c303592733 /mfbt | |
parent | 88236969275819e48124859a09c32cbfa8dad448 (diff) | |
download | uxp-437a613e6e72d790af1826391976d05463d604a7.tar.gz |
Clean up Firefox specific considerations from WindowsVersion.h
Tag mcp-graveyard/UXP#22.
Diffstat (limited to 'mfbt')
-rw-r--r-- | mfbt/WindowsVersion.h | 77 |
1 files changed, 4 insertions, 73 deletions
diff --git a/mfbt/WindowsVersion.h b/mfbt/WindowsVersion.h index f8b0718612..4d0cb374b9 100644 --- a/mfbt/WindowsVersion.h +++ b/mfbt/WindowsVersion.h @@ -84,45 +84,12 @@ IsWindowsBuildOrLater(uint32_t aBuild) return false; } -#if defined(_M_X64) || defined(_M_AMD64) -// We support only Win7 or later on Win64. -MOZ_ALWAYS_INLINE bool -IsXPSP3OrLater() -{ - return true; -} - -MOZ_ALWAYS_INLINE bool -IsWin2003OrLater() -{ - return true; -} - -MOZ_ALWAYS_INLINE bool -IsWin2003SP2OrLater() -{ - return true; -} - -MOZ_ALWAYS_INLINE bool -IsVistaOrLater() -{ - return true; -} - -MOZ_ALWAYS_INLINE bool -IsVistaSP1OrLater() -{ - return true; -} +// Although many of the older versions are not supported, we should keep +// these entries for completeness (since they don't take any resources of +// note), and to cater to corner cases for applications running e.g. in +// Windows' compatibility mode. MOZ_ALWAYS_INLINE bool -IsWin7OrLater() -{ - return true; -} -#else -MOZ_ALWAYS_INLINE bool IsXPSP3OrLater() { return IsWindowsVersionOrLater(0x05010300ul); @@ -157,7 +124,6 @@ IsWin7OrLater() { return IsWindowsVersionOrLater(0x06010000ul); } -#endif MOZ_ALWAYS_INLINE bool IsWin7SP1OrLater() @@ -190,41 +156,6 @@ IsNotWin7PreRTM() IsWindowsBuildOrLater(7600); } -MOZ_ALWAYS_INLINE bool -IsWin7AndPre2000Compatible() { - /* - * See Bug 1279171. - * We'd like to avoid using WMF on specific OS version when compatibility - * mode is in effect. The purpose of this function is to check if FF runs on - * Win7 OS with application compatibility mode being set to 95/98/ME. - * Those compatibility mode options (95/98/ME) can only display and - * be selected for 32-bit application. - * If the compatibility mode is in effect, the GetVersionEx function will - * report the OS as it identifies itself, which may not be the OS that is - * installed. - * Note : 1) We only target for Win7 build number greater than 7600. - * 2) GetVersionEx may be altered or unavailable for release after - * Win8.1. Set pragma to avoid build warning as error. - */ - bool isWin7 = IsNotWin7PreRTM() && !IsWin8OrLater(); - if (!isWin7) { - return false; - } - - OSVERSIONINFOEX info; - ZeroMemory(&info, sizeof(OSVERSIONINFOEX)); - - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); -#pragma warning(push) -#pragma warning(disable:4996) - bool success = GetVersionEx((LPOSVERSIONINFO) &info); -#pragma warning(pop) - if (!success) { - return false; - } - return info.dwMajorVersion < 5; -} - } // namespace mozilla #endif /* mozilla_WindowsVersion_h */ |