Bug 972793 - Remove GetVersionEx from js/src/. r=luke

This commit is contained in:
Masatoshi Kimura 2014-02-28 07:58:50 +09:00
parent fdd301c353
commit aab5acb386

View File

@ -28,6 +28,7 @@
#if ENABLE_ASSEMBLER && WTF_OS_WINDOWS
#include "jswin.h"
#include "mozilla/WindowsVersion.h"
extern uint64_t random_next(uint64_t *, int);
@ -72,16 +73,8 @@ void *ExecutableAllocator::computeRandomAllocationAddress()
static bool
RandomizeIsBrokenImpl()
{
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
// Version number mapping is available at:
// http://msdn.microsoft.com/en-us/library/ms724832%28v=vs.85%29.aspx
// We disable everything before Vista, for now.
return osvi.dwMajorVersion <= 5;
return !mozilla::IsVistaOrLater();
}
static bool