From 2b01522cf3cda6343fab8a6e3482636d0fb6c4bd Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 19 Feb 2018 12:15:47 +0100 Subject: Remove redundant Vista checks in toolkit/xre --- toolkit/xre/nsAppRunner.cpp | 21 ++------------------- toolkit/xre/nsXREDirProvider.cpp | 10 +++------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 4979e1652..4a1d3046f 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -98,7 +98,6 @@ #include #include #include "cairo/cairo-features.h" -#include "mozilla/WindowsVersion.h" #include "mozilla/mscom/MainThreadRuntime.h" #include "mozilla/widget/AudioSession.h" @@ -3106,10 +3105,7 @@ XREMain::XRE_mainInit(bool* aExitFlag) // manual font file I/O on _all_ system fonts. To avoid this, load the // dwrite library and create a factory as early as possible so that the // FntCache service is ready by the time it's needed. - - if (IsVistaOrLater()) { - CreateThread(nullptr, 0, &InitDwriteBG, nullptr, 0, nullptr); - } + CreateThread(nullptr, 0, &InitDwriteBG, nullptr, 0, nullptr); } #endif @@ -4835,7 +4831,7 @@ enum { kE10sDisabledForAddons = 7, kE10sForceDisabled = 8, // kE10sDisabledForXPAcceleration = 9, removed in bug 1296353 - kE10sDisabledForOperatingSystem = 10, + // kE10sDisabledForOperatingSystem = 10, removed due to xp-eol }; const char* kAccessibilityLastRunDatePref = "accessibility.lastLoadDate"; @@ -4912,19 +4908,6 @@ MultiprocessBlockPolicy() { } #endif - /** - * Avoids enabling e10s for Windows XP users on the release channel. - */ -#if defined(XP_WIN) - if (!IsVistaOrLater()) { - nsAdoptingCString channelName = Preferences::GetDefaultCString("app.update.channel"); - if (channelName.EqualsLiteral("release") || channelName.EqualsLiteral("esr")) { - gMultiprocessBlockPolicy = kE10sDisabledForOperatingSystem; - return gMultiprocessBlockPolicy; - } - } -#endif // XP_WIN - /* * None of the blocking policies matched, so e10s is allowed to run. * Cache the information and return 0, indicating success. diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp index 2fbd324b7..09168319f 100644 --- a/toolkit/xre/nsXREDirProvider.cpp +++ b/toolkit/xre/nsXREDirProvider.cpp @@ -48,7 +48,6 @@ #ifdef XP_WIN #include #include -#include "mozilla/WindowsVersion.h" #endif #ifdef XP_MACOSX #include "nsILocalFileMac.h" @@ -762,15 +761,12 @@ nsXREDirProvider::LoadContentProcessTempDir() static bool IsContentSandboxDisabled() { + bool isSandboxDisabled = false; if (!BrowserTabsRemoteAutostart()) { return false; } -#if defined(XP_WIN) - const bool isSandboxDisabled = !mozilla::IsVistaOrLater() || - (Preferences::GetInt("security.sandbox.content.level") < 1); -#elif defined(XP_MACOSX) - const bool isSandboxDisabled = - Preferences::GetInt("security.sandbox.content.level") < 1; +#if defined(XP_WIN) || defined(XP_MACOSX) + isSandboxDisabled = Preferences::GetInt("security.sandbox.content.level") < 1; #endif return isSandboxDisabled; } -- cgit v1.2.3