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

Unified Diff: runtime/vm/pages.cc

Issue 1834333002: Precompilation: Don't look at embedder allocated pages when finalizing the VM isolate. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/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 177b09159a0bcbe8839fffa65ec068345d7a0fd9..d7d3a2c5f43a8589b9b7cf06aac9c890d4f744bc 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -611,6 +611,15 @@ void PageSpace::VisitObjects(ObjectVisitor* visitor) const {
}
+void PageSpace::VisitObjectsNoEmbedderPages(ObjectVisitor* visitor) const {
+ for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
+ if (!it.page()->embedder_allocated()) {
+ it.page()->VisitObjects(visitor);
+ }
+ }
+}
+
+
void PageSpace::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
it.page()->VisitObjectPointers(visitor);
@@ -652,15 +661,13 @@ RawObject* PageSpace::FindObject(FindObjectVisitor* visitor,
}
-void PageSpace::WriteProtect(bool read_only, bool include_code_pages) {
+void PageSpace::WriteProtect(bool read_only) {
if (read_only) {
// Avoid MakeIterable trying to write to the heap.
AbandonBumpAllocation();
}
for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
- HeapPage::PageType page_type = it.page()->type();
- if ((page_type != HeapPage::kReadOnlyData) &&
- ((page_type != HeapPage::kExecutable) || include_code_pages)) {
+ if (!it.page()->embedder_allocated()) {
it.page()->WriteProtect(read_only);
}
}
« no previous file with comments | « runtime/vm/pages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698