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

Unified Diff: runtime/vm/object.cc

Issue 138913016: Fix flag to switch write protection of code pages on/off. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed test to match expectation Created 6 years, 10 months 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 | « no previous file | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 32548)
+++ runtime/vm/object.cc (working copy)
@@ -70,6 +70,7 @@
DECLARE_FLAG(bool, trace_deoptimization_verbose);
DECLARE_FLAG(bool, verbose_stacktrace);
DECLARE_FLAG(charp, coverage_dir);
+DECLARE_FLAG(bool, write_protect_code);
static const char* kGetterPrefix = "get:";
static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
@@ -10228,7 +10229,9 @@
bool status =
VirtualMemory::Protect(reinterpret_cast<void*>(instrs.raw_ptr()),
instrs.raw()->Size(),
- VirtualMemory::kReadExecute);
+ FLAG_write_protect_code
+ ? VirtualMemory::kReadExecute
+ : VirtualMemory::kReadWriteExecute);
ASSERT(status);
}
return code.raw();
« no previous file with comments | « no previous file | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698