зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1823634 - Use VirtualAlloc to achieve VirtualProtect's purpose on the most impactful path. r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D175483
This commit is contained in:
Родитель
8d0712b2c6
Коммит
ab25db87a4
|
@ -897,9 +897,10 @@ bool js::jit::ReprotectRegion(void* start, size_t size,
|
|||
std::atomic_thread_fence(std::memory_order_seq_cst);
|
||||
|
||||
# ifdef XP_WIN
|
||||
DWORD oldProtect;
|
||||
DWORD flags = ProtectionSettingToFlags(protection);
|
||||
if (!VirtualProtect(pageStart, size, flags, &oldProtect)) {
|
||||
// This is a essentially a VirtualProtect, but with lighter impact on
|
||||
// antivirus analysis. See bug 1823634.
|
||||
if (!VirtualAlloc(pageStart, size, MEM_COMMIT, flags)) {
|
||||
return false;
|
||||
}
|
||||
# else
|
||||
|
|
Загрузка…
Ссылка в новой задаче