Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: src/base/platform/platform-win32.cc

Issue 768543002: [WIP] TrapHandler 2014/11/27. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | src/compiler/access-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/platform-win32.cc
diff --git a/src/base/platform/platform-win32.cc b/src/base/platform/platform-win32.cc
index d68e8617d721d7e267c85d5ab121952ab83f45cf..5146ff5324d3da9ddec30e45147aadb11405d3d4 100644
--- a/src/base/platform/platform-win32.cc
+++ b/src/base/platform/platform-win32.cc
@@ -799,12 +799,18 @@ void OS::ProtectCode(void* address, const size_t size) {
}
-void OS::Guard(void* address, const size_t size) {
+void OS::Guard(void* const address, size_t const size) {
DWORD oldprotect;
VirtualProtect(address, size, PAGE_NOACCESS, &oldprotect);
}
+void OS::Unguard(void* const address, size_t const size) {
+ DWORD oldprotect;
+ VirtualProtect(address, size, PAGE_READWRITE, &oldprotect);
+}
+
+
void OS::Sleep(int milliseconds) {
::Sleep(milliseconds);
}
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | src/compiler/access-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698