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

Unified Diff: runtime/vm/pages.cc

Issue 2583673002: When creating a JIT app snapshot, don't recreate the VM isolate snapshot. (Closed)
Patch Set: Created 4 years 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/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 4fb4efbc83e487722bfd602fd5329815239bbc77..07a9e5ce59fc42d9bba78dbdb1853532fc86999b 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -139,6 +139,8 @@ RawObject* HeapPage::FindObject(FindObjectVisitor* visitor) const {
void HeapPage::WriteProtect(bool read_only) {
+ ASSERT(!embedder_allocated());
+
VirtualMemory::Protection prot;
if (read_only) {
if (type_ == kExecutable) {
@@ -1100,7 +1102,13 @@ void PageSpace::SetupExternalPage(void* pointer,
if (*first == NULL) {
*first = page;
} else {
+ if (is_executable && FLAG_write_protect_code) {
+ (*tail)->WriteProtect(false);
+ }
(*tail)->set_next(page);
+ if (is_executable && FLAG_write_protect_code) {
+ (*tail)->WriteProtect(true);
+ }
}
(*tail) = page;
}
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/stub_code.h » ('j') | runtime/vm/stub_code.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698