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

Unified Diff: runtime/vm/object.cc

Issue 296003013: - Reduce the number of Isolate::Current() calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 36483)
+++ runtime/vm/object.cc (working copy)
@@ -11607,13 +11607,12 @@
// GrowableObjectArray in new space.
instrs.set_object_pool(Array::MakeArray(object_pool));
}
- bool status =
- VirtualMemory::Protect(reinterpret_cast<void*>(instrs.raw_ptr()),
- instrs.raw()->Size(),
- FLAG_write_protect_code
- ? VirtualMemory::kReadExecute
- : VirtualMemory::kReadWriteExecute);
- ASSERT(status);
+ if (FLAG_write_protect_code) {
+ bool status = VirtualMemory::Protect(
+ reinterpret_cast<void*>(instrs.raw_ptr()), instrs.raw()->Size(),
+ VirtualMemory::kReadExecute);
+ ASSERT(status);
+ }
}
code.set_comments(assembler->GetCodeComments());
return code.raw();

Powered by Google App Engine
This is Rietveld 408576698