Bug 1336778 - Part 2: Remove always-false #if WINVER < 0x0600 (Windows Vista) checks in widget/windows. r?jimm
As of
bug 1325299, WINVER is always >= 0x0601 (Windows 7).
MozReview-Commit-ID: Hw5FcEdP0os
--- a/widget/windows/LSPAnnotator.cpp
+++ b/widget/windows/LSPAnnotator.cpp
@@ -6,21 +6,16 @@
* LSPs are evil little bits of code that are allowed to inject into our
* networking stack by Windows. Once they have wormed into our process
* they gnaw at our innards until we crash. Here we force the buggers
* into the light by recording them in our crash information.
* We do the enumeration on a thread because I'm concerned about startup perf
* on machines with several LSPs.
*/
-#if _WIN32_WINNT < 0x0600
-// Redefining _WIN32_WINNT for some Vista APIs that we call
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0600
-#endif
#include "nsICrashReporter.h"
#include "nsISupportsImpl.h"
#include "nsServiceManagerUtils.h"
#include "nsThreadUtils.h"
#include "nsQueryObject.h"
#include "nsWindowsHelpers.h"
#include <windows.h>
#include <rpc.h>
--- a/widget/windows/WindowsUIUtils.cpp
+++ b/widget/windows/WindowsUIUtils.cpp
@@ -1,16 +1,17 @@
/* -*- 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 <windows.h>
#include <winsdkver.h>
-#include "mozwrlbase.h"
+#include <wrl.h>
+
#include "nsServiceManagerUtils.h"
#include "WindowsUIUtils.h"
#include "nsIObserverService.h"
#include "nsIBaseWindow.h"
#include "nsIDocShell.h"
#include "nsIAppShellService.h"
@@ -174,9 +175,8 @@ WindowsUIUtils::UpdateTabletModeState()
}
}
}
}
#endif
return NS_OK;
}
-
deleted file mode 100644
--- a/widget/windows/mozwrlbase.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; 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/. */
-
-#pragma once
-
-/*
- * Includes <wrl.h> and it's children. Defines imports needed by
- * corewrappers.h in the case where windows.h has already been
- * included w/WINVER < 0x600. Also ups WINVER/_WIN32_WINNT prior
- * to including wrl.h. Mozilla's build currently has WINVER set to
- * 0x502 for XP support.
- */
-
-#if _WIN32_WINNT < 0x600
-
-#include <windows.h>
-
-VOID
-WINAPI
-ReleaseSRWLockExclusive(
- _Inout_ PSRWLOCK SRWLock
- );
-
-VOID
-WINAPI
-ReleaseSRWLockShared(
- _Inout_ PSRWLOCK SRWLock
- );
-
-BOOL
-WINAPI
-InitializeCriticalSectionEx(
- _Out_ LPCRITICAL_SECTION lpCriticalSection,
- _In_ DWORD dwSpinCount,
- _In_ DWORD Flags
- );
-
-VOID
-WINAPI
-InitializeSRWLock(
- _Out_ PSRWLOCK SRWLock
- );
-
-VOID
-WINAPI
-AcquireSRWLockExclusive(
- _Inout_ PSRWLOCK SRWLock
- );
-
-BOOLEAN
-WINAPI
-TryAcquireSRWLockExclusive(
- _Inout_ PSRWLOCK SRWLock
- );
-
-BOOLEAN
-WINAPI
-TryAcquireSRWLockShared(
- _Inout_ PSRWLOCK SRWLock
- );
-
-VOID
-WINAPI
-AcquireSRWLockShared(
- _Inout_ PSRWLOCK SRWLock
- );
-
-#undef WINVER
-#undef _WIN32_WINNT
-#define WINVER 0x600
-#define _WIN32_WINNT 0x600
-
-#endif // _WIN32_WINNT < 0x600
-
-#include <wrl.h>
--- a/widget/windows/nsFilePicker.h
+++ b/widget/windows/nsFilePicker.h
@@ -4,27 +4,16 @@
* 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/. */
#ifndef nsFilePicker_h__
#define nsFilePicker_h__
#include <windows.h>
-// For Vista IFileDialog interfaces which aren't exposed
-// unless _WIN32_WINNT >= _WIN32_WINNT_LONGHORN.
-#if _WIN32_WINNT < _WIN32_WINNT_LONGHORN
-#define _WIN32_WINNT_bak _WIN32_WINNT
-#undef _WIN32_WINNT
-#define _WIN32_WINNT _WIN32_WINNT_LONGHORN
-#define _WIN32_IE_bak _WIN32_IE
-#undef _WIN32_IE
-#define _WIN32_IE _WIN32_IE_IE70
-#endif
-
#include "nsIFile.h"
#include "nsITimer.h"
#include "nsISimpleEnumerator.h"
#include "nsCOMArray.h"
#include "nsBaseFilePicker.h"
#include "nsString.h"
#include "nsdefs.h"
#include <commdlg.h>
@@ -136,16 +125,9 @@ protected:
AutoTArray<COMDLG_FILTERSPEC, 1> mSpecList;
AutoTArray<nsString, 2> mStrings;
};
ComDlgFilterSpec mComFilterList;
DWORD mFDECookie;
};
-#if defined(_WIN32_WINNT_bak)
-#undef _WIN32_WINNT
-#define _WIN32_WINNT _WIN32_WINNT_bak
-#undef _WIN32_IE
-#define _WIN32_IE _WIN32_IE_bak
-#endif
-
#endif // nsFilePicker_h__