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

Unified Diff: runtime/vm/object_test.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 | « runtime/vm/object.cc ('k') | runtime/vm/virtual_memory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
===================================================================
--- runtime/vm/object_test.cc (revision 32548)
+++ runtime/vm/object_test.cc (working copy)
@@ -17,6 +17,8 @@
namespace dart {
+DECLARE_FLAG(bool, write_protect_code);
+
static RawLibrary* CreateDummyLibrary(const String& library_name) {
return Library::New(library_name);
}
@@ -2486,6 +2488,11 @@
#endif
EXPECT_EQ(3, retval);
EXPECT_EQ(instructions.raw(), Instructions::FromEntryPoint(entry_point));
+ if (!FLAG_write_protect_code) {
+ // Since this test is expected to crash, crash if write protection of code
+ // is switched off.
+ OS::DebugBreak();
+ }
}
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/virtual_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698