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

Unified Diff: runtime/vm/pages.cc

Issue 2626343002: 1. Added new flag verify_gc_contains and moved all the asserts that do a (Closed)
Patch Set: Created 3 years, 11 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') | runtime/vm/scavenger.cc » ('j') | 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 1d7cb9afd6c4be4c125d531f11b3fefd8d042d57..6d959cda750bbb4a5311767f88289a3669522e83 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -600,6 +600,17 @@ bool PageSpace::Contains(uword addr, HeapPage::PageType type) const {
}
+bool PageSpace::DataContains(uword addr) const {
+ for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
+ if ((it.page()->type() != HeapPage::kExecutable) &&
+ it.page()->Contains(addr)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+
void PageSpace::AddRegionsToObjectSet(ObjectSet* set) const {
ASSERT((pages_ != NULL) || (exec_pages_ != NULL) || (large_pages_ != NULL));
for (ExclusivePageIterator it(this); !it.Done(); it.Advance()) {
« no previous file with comments | « runtime/vm/pages.h ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698