Bug 1852806 - Remove macros for older Windows SDK from xpcom/. r=xpcom-reviewers,glandium
Depends on D188032 Differential Revision: https://phabricator.services.mozilla.com/D188033
This commit is contained in:
@@ -34,8 +34,7 @@ namespace {
|
|||||||
|
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
|
|
||||||
# if defined(__MINGW32__) || (NTDDI_VERSION < NTDDI_WINBLUE) || \
|
# if defined(__MINGW32__)
|
||||||
(NTDDI_VERSION == NTDDI_WINBLUE && !defined(WINBLUE_KBSPRING14))
|
|
||||||
// Definitions for heap optimization that require the Windows SDK to target the
|
// Definitions for heap optimization that require the Windows SDK to target the
|
||||||
// Windows 8.1 Update
|
// Windows 8.1 Update
|
||||||
static const HEAP_INFORMATION_CLASS HeapOptimizeResources =
|
static const HEAP_INFORMATION_CLASS HeapOptimizeResources =
|
||||||
|
|||||||
@@ -930,7 +930,7 @@ nsresult CollectProcessInfo(ProcessInfo& info) {
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(XP_WIN) && (_WIN32_WINNT < 0x0A00) || defined(__MINGW32__)
|
#if defined(__MINGW32__)
|
||||||
WINBASEAPI
|
WINBASEAPI
|
||||||
BOOL WINAPI IsUserCetAvailableInEnvironment(_In_ DWORD UserCetEnvironment);
|
BOOL WINAPI IsUserCetAvailableInEnvironment(_In_ DWORD UserCetEnvironment);
|
||||||
|
|
||||||
|
|||||||
@@ -50,14 +50,7 @@ void mozilla::PrefetchMemory(uint8_t* aStart, size_t aNumBytes) {
|
|||||||
#elif defined(XP_WIN)
|
#elif defined(XP_WIN)
|
||||||
MaybeInitPrefetchVirtualMemory();
|
MaybeInitPrefetchVirtualMemory();
|
||||||
if (*sPrefetchVirtualMemory) {
|
if (*sPrefetchVirtualMemory) {
|
||||||
// Normally, we'd use WIN32_MEMORY_RANGE_ENTRY, but that requires
|
WIN32_MEMORY_RANGE_ENTRY entry;
|
||||||
// a different _WIN32_WINNT value before including windows.h, but
|
|
||||||
// that causes complications with unified sources. It's a simple
|
|
||||||
// enough struct anyways.
|
|
||||||
struct {
|
|
||||||
PVOID VirtualAddress;
|
|
||||||
SIZE_T NumberOfBytes;
|
|
||||||
} entry;
|
|
||||||
entry.VirtualAddress = aStart;
|
entry.VirtualAddress = aStart;
|
||||||
entry.NumberOfBytes = aNumBytes;
|
entry.NumberOfBytes = aNumBytes;
|
||||||
(*sPrefetchVirtualMemory)(GetCurrentProcess(), 1, &entry, 0);
|
(*sPrefetchVirtualMemory)(GetCurrentProcess(), 1, &entry, 0);
|
||||||
|
|||||||
@@ -93,25 +93,6 @@ static nsresult GetWindowsFolder(int aFolder, nsIFile** aFile) {
|
|||||||
return NS_NewLocalFile(nsDependentString(path, len), true, aFile);
|
return NS_NewLocalFile(nsDependentString(path, len), true, aFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
# if WINVER < 0x0601
|
|
||||||
__inline HRESULT SHLoadLibraryFromKnownFolder(REFKNOWNFOLDERID aFolderId,
|
|
||||||
DWORD aMode, REFIID riid,
|
|
||||||
void** ppv) {
|
|
||||||
*ppv = nullptr;
|
|
||||||
IShellLibrary* plib;
|
|
||||||
HRESULT hr = CoCreateInstance(CLSID_ShellLibrary, nullptr,
|
|
||||||
CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&plib));
|
|
||||||
if (SUCCEEDED(hr)) {
|
|
||||||
hr = plib->LoadLibraryFromKnownFolder(aFolderId, aMode);
|
|
||||||
if (SUCCEEDED(hr)) {
|
|
||||||
hr = plib->QueryInterface(riid, ppv);
|
|
||||||
}
|
|
||||||
plib->Release();
|
|
||||||
}
|
|
||||||
return hr;
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
|
# if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
|
||||||
/*
|
/*
|
||||||
* Return the default save-to location for the Windows Library passed in
|
* Return the default save-to location for the Windows Library passed in
|
||||||
|
|||||||
Reference in New Issue
Block a user