зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
e131ddb2b3
Коммит
7226d6efbe
|
@ -34,8 +34,7 @@ namespace {
|
|||
|
||||
#if defined(XP_WIN)
|
||||
|
||||
# if defined(__MINGW32__) || (NTDDI_VERSION < NTDDI_WINBLUE) || \
|
||||
(NTDDI_VERSION == NTDDI_WINBLUE && !defined(WINBLUE_KBSPRING14))
|
||||
# if defined(__MINGW32__)
|
||||
// Definitions for heap optimization that require the Windows SDK to target the
|
||||
// Windows 8.1 Update
|
||||
static const HEAP_INFORMATION_CLASS HeapOptimizeResources =
|
||||
|
|
|
@ -930,7 +930,7 @@ nsresult CollectProcessInfo(ProcessInfo& info) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#if defined(XP_WIN) && (_WIN32_WINNT < 0x0A00) || defined(__MINGW32__)
|
||||
#if defined(__MINGW32__)
|
||||
WINBASEAPI
|
||||
BOOL WINAPI IsUserCetAvailableInEnvironment(_In_ DWORD UserCetEnvironment);
|
||||
|
||||
|
|
|
@ -50,14 +50,7 @@ void mozilla::PrefetchMemory(uint8_t* aStart, size_t aNumBytes) {
|
|||
#elif defined(XP_WIN)
|
||||
MaybeInitPrefetchVirtualMemory();
|
||||
if (*sPrefetchVirtualMemory) {
|
||||
// Normally, we'd use WIN32_MEMORY_RANGE_ENTRY, but that requires
|
||||
// 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;
|
||||
WIN32_MEMORY_RANGE_ENTRY entry;
|
||||
entry.VirtualAddress = aStart;
|
||||
entry.NumberOfBytes = aNumBytes;
|
||||
(*sPrefetchVirtualMemory)(GetCurrentProcess(), 1, &entry, 0);
|
||||
|
|
|
@ -93,25 +93,6 @@ static nsresult GetWindowsFolder(int aFolder, nsIFile** 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)
|
||||
/*
|
||||
* Return the default save-to location for the Windows Library passed in
|
||||
|
|
Загрузка…
Ссылка в новой задаче