Bug 1137609: Test for the missing export because we can't trust the version. r=glandium

--HG--
extra : rebase_source : afa4439bcc3cfbc4a25999cf096962e02a2a95a4
This commit is contained in:
David Major 2015-03-03 19:33:31 +13:00
parent 00a74cff8f
commit defc758e61

View File

@ -128,11 +128,15 @@ Init()
MOZ_ASSERT(!GetModuleHandleA("msvcr120d.dll"));
#if defined(_M_IX86) && defined(_MSC_VER)
if (!mozilla::IsXPSP3OrLater()) {
NtdllIntercept.Init("ntdll.dll");
NtdllIntercept.AddHook("RtlImageNtHeader",
reinterpret_cast<intptr_t>(patched_RtlImageNtHeader),
reinterpret_cast<void**>(&stub_RtlImageNtHeader));
if (!mozilla::IsWin2003OrLater()) {
// Test for the export because we can't trust the SP version (bug 1137609)
HMODULE kernel = GetModuleHandleA("kernel32.dll");
if (!kernel || !GetProcAddress(kernel, "GetLogicalProcessorInformation")) {
NtdllIntercept.Init("ntdll.dll");
NtdllIntercept.AddHook("RtlImageNtHeader",
reinterpret_cast<intptr_t>(patched_RtlImageNtHeader),
reinterpret_cast<void**>(&stub_RtlImageNtHeader));
}
}
#endif
}