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

Unified Diff: runtime/vm/heap.cc

Issue 1408653002: Skip making code pages temporarily writable when finalizing the VM isolate loaded from precompiled … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 2b319fd931feb51ecee1d9ec7494e0460fff78a4..1453bd262597c376ca84d66c3f4c377d2be63671 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -473,10 +473,10 @@ bool Heap::GrowthControlState() {
}
-void Heap::WriteProtect(bool read_only) {
+void Heap::WriteProtect(bool read_only, bool include_code_pages) {
read_only_ = read_only;
new_space_.WriteProtect(read_only);
- old_space_.WriteProtect(read_only);
+ old_space_.WriteProtect(read_only, include_code_pages);
}
@@ -800,15 +800,16 @@ NoHeapGrowthControlScope::~NoHeapGrowthControlScope() {
}
-WritableVMIsolateScope::WritableVMIsolateScope(Thread* thread)
- : StackResource(thread) {
- Dart::vm_isolate()->heap()->WriteProtect(false);
+WritableVMIsolateScope::WritableVMIsolateScope(Thread* thread,
+ bool include_code_pages)
+ : StackResource(thread), include_code_pages_(include_code_pages) {
+ Dart::vm_isolate()->heap()->WriteProtect(false, include_code_pages_);
}
WritableVMIsolateScope::~WritableVMIsolateScope() {
ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
- Dart::vm_isolate()->heap()->WriteProtect(true);
+ Dart::vm_isolate()->heap()->WriteProtect(true, include_code_pages_);
}
} // namespace dart
« runtime/vm/heap.h ('K') | « runtime/vm/heap.h ('k') | runtime/vm/heap_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698