diff options
author | Pale Moon <git-repo@palemoon.org> | 2018-01-20 10:42:57 +0100 |
---|---|---|
committer | Pale Moon <git-repo@palemoon.org> | 2018-01-20 10:42:57 +0100 |
commit | f6c1a6b467adff2ec3838e5a3e30c0469335c169 (patch) | |
tree | ea5ae5b11094d8592b62b053d849d7eaaf6bccc5 /xpcom | |
parent | b8c009079e0f0eab3bf74599cd3793db33a71c5d (diff) | |
download | palemoon-gre-f6c1a6b467adff2ec3838e5a3e30c0469335c169.tar.gz |
Issue #1595 part 1: Remove Vista checks in XPCOM
Diffstat (limited to 'xpcom')
-rw-r--r-- | xpcom/glue/nsThreadUtils.cpp | 5 | ||||
-rw-r--r-- | xpcom/io/nsLocalFileWin.cpp | 17 |
2 files changed, 8 insertions, 14 deletions
diff --git a/xpcom/glue/nsThreadUtils.cpp b/xpcom/glue/nsThreadUtils.cpp index 9346bd1b5..1da2e0fc0 100644 --- a/xpcom/glue/nsThreadUtils.cpp +++ b/xpcom/glue/nsThreadUtils.cpp @@ -18,8 +18,6 @@ #ifdef XP_WIN #include <windows.h> -#include "mozilla/WindowsVersion.h" -using mozilla::IsVistaOrLater; #elif defined(XP_MACOSX) #include <sys/resource.h> #endif @@ -347,8 +345,7 @@ nsThreadPoolNaming::SetThreadPoolName(const nsACString& aPoolName, nsAutoLowPriorityIO::nsAutoLowPriorityIO() { #if defined(XP_WIN) - lowIOPrioritySet = IsVistaOrLater() && - SetThreadPriority(GetCurrentThread(), + lowIOPrioritySet = SetThreadPriority(GetCurrentThread(), THREAD_MODE_BACKGROUND_BEGIN); #elif defined(XP_MACOSX) oldPriority = getiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_THREAD); diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index ee11a56a0..8408632d5 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -1916,21 +1916,18 @@ nsLocalFile::CopySingleFile(nsIFile* aSourceFile, nsIFile* aDestParent, // Pass the flag COPY_FILE_NO_BUFFERING to CopyFileEx as we may be copying // to a SMBV2 remote drive. Without this parameter subsequent append mode - // file writes can cause the resultant file to become corrupt. We only need to do - // this if the major version of Windows is > 5(Only Windows Vista and above - // can support SMBV2). With a 7200RPM hard drive: + // file writes can cause the resultant file to become corrupt. With a 7200RPM + // hard drive: // Copying a 1KB file with COPY_FILE_NO_BUFFERING takes about 30-60ms. // Copying a 1KB file without COPY_FILE_NO_BUFFERING takes < 1ms. // So we only use COPY_FILE_NO_BUFFERING when we have a remote drive. int copyOK; DWORD dwCopyFlags = COPY_FILE_ALLOW_DECRYPTED_DESTINATION; - if (IsVistaOrLater()) { - bool path1Remote, path2Remote; - if (!IsRemoteFilePath(filePath.get(), path1Remote) || - !IsRemoteFilePath(destPath.get(), path2Remote) || - path1Remote || path2Remote) { - dwCopyFlags |= COPY_FILE_NO_BUFFERING; - } + bool path1Remote, path2Remote; + if (!IsRemoteFilePath(filePath.get(), path1Remote) || + !IsRemoteFilePath(destPath.get(), path2Remote) || + path1Remote || path2Remote) { + dwCopyFlags |= COPY_FILE_NO_BUFFERING; } if (!move) { |