mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 07:40:42 +00:00
Bug 1445947 - Remove re-protection warnings from Windows VirtualProtect calls. r=ehoogeveen
This commit is contained in:
parent
91d4f43011
commit
f2d5e254b2
@ -859,7 +859,6 @@ ProtectPages(void* p, size_t size)
|
||||
MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_NOACCESS) failed! Error code: %lu",
|
||||
GetLastError());
|
||||
}
|
||||
MOZ_ASSERT(oldProtect == PAGE_READWRITE);
|
||||
#else // assume Unix
|
||||
if (mprotect(p, size, PROT_NONE))
|
||||
MOZ_CRASH("mprotect(PROT_NONE) failed");
|
||||
@ -878,7 +877,6 @@ MakePagesReadOnly(void* p, size_t size)
|
||||
MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_READONLY) failed! Error code: %lu",
|
||||
GetLastError());
|
||||
}
|
||||
MOZ_ASSERT(oldProtect == PAGE_READWRITE);
|
||||
#else // assume Unix
|
||||
if (mprotect(p, size, PROT_READ))
|
||||
MOZ_CRASH("mprotect(PROT_READ) failed");
|
||||
@ -897,7 +895,6 @@ UnprotectPages(void* p, size_t size)
|
||||
MOZ_CRASH_UNSAFE_PRINTF("VirtualProtect(PAGE_READWRITE) failed! Error code: %lu",
|
||||
GetLastError());
|
||||
}
|
||||
MOZ_ASSERT(oldProtect == PAGE_NOACCESS || oldProtect == PAGE_READONLY);
|
||||
#else // assume Unix
|
||||
if (mprotect(p, size, PROT_READ | PROT_WRITE))
|
||||
MOZ_CRASH("mprotect(PROT_READ | PROT_WRITE) failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user