diff --git a/deps/chakrashim/core/lib/Common/Memory/PageAllocator.h b/deps/chakrashim/core/lib/Common/Memory/PageAllocator.h index 28370d00db9..4adc0eb0acd 100644 --- a/deps/chakrashim/core/lib/Common/Memory/PageAllocator.h +++ b/deps/chakrashim/core/lib/Common/Memory/PageAllocator.h @@ -397,7 +397,7 @@ class MemoryOperationLastError #if ENABLE_OOP_NATIVE_CODEGEN if (MemOpLastError == S_OK) { - MemOpLastError = GetLastError(); + MemOpLastError = HRESULT_FROM_WIN32(::GetLastError()); } #endif } @@ -407,7 +407,7 @@ class MemoryOperationLastError #if ENABLE_OOP_NATIVE_CODEGEN if (MemOpLastError == S_OK) { - MemOpLastError = HRESULT_FROM_WIN32(error); + MemOpLastError = error; } #endif }