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

Unified Diff: runtime/vm/pages.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
« runtime/vm/heap.h ('K') | « runtime/vm/pages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index da7ec8059aeb03c5534002221013e17a36e4c5ff..6dc7e9320cd4ea722b2cd4d03175d1055618451a 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -657,13 +657,15 @@ RawObject* PageSpace::FindObject(FindObjectVisitor* visitor,
}
-void PageSpace::WriteProtect(bool read_only) {
+void PageSpace::WriteProtect(bool read_only, bool include_code_pages) {
if (read_only) {
// Avoid MakeIterable trying to write to the heap.
AbandonBumpAllocation();
}
for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
- it.page()->WriteProtect(read_only);
+ if ((it.page()->type() != HeapPage::kExecutable) || include_code_pages) {
+ it.page()->WriteProtect(read_only);
+ }
}
}
« runtime/vm/heap.h ('K') | « runtime/vm/pages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698