|
|
@@ -24,6 +24,8 @@ Memory::ChakraMemSet(_In_ void *dst, int val, size_t sizeInBytes, HANDLE process
|
|
|
{
|
|
|
if (!WriteProcessMemory(processHandle, dst, writeBuffer, sizeInBytes, NULL))
|
|
|
{
|
|
|
+ Js::Throw::CheckAndThrowJITOperationFailed();
|
|
|
+ // if it's not E_ACCESSDENIED
|
|
|
Js::Throw::FatalInternalError();
|
|
|
}
|
|
|
HeapDeleteArray(sizeInBytes, writeBuffer);
|
|
|
@@ -48,6 +50,7 @@ Memory::ChakraMemCopy(_In_ void *dst, size_t sizeInBytes, _In_reads_bytes_(count
|
|
|
if (!WriteProcessMemory(processHandle, dst, src, count, NULL))
|
|
|
{
|
|
|
Output::Print(_u("FATAL ERROR: WriteProcessMemory failed, GLE: %d\n"), GetLastError());
|
|
|
+ Js::Throw::CheckAndThrowJITOperationFailed();
|
|
|
Js::Throw::FatalInternalError();
|
|
|
}
|
|
|
}
|