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

Unified Diff: runtime/vm/scavenger.cc

Issue 24775002: Fix --gc_at_alloc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/raw_object.cc ('K') | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index 17b95f229d2d999be1d9a65b9dfcc7108311d90a..efcdf74c0f41a484141b873fdf7704d1dec4c2c8 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -408,7 +408,11 @@ void Scavenger::IterateStoreBuffers(Isolate* isolate,
void Scavenger::IterateObjectIdTable(Isolate* isolate,
ScavengerVisitor* visitor) {
ObjectIdRing* ring = isolate->object_id_ring();
- ASSERT(ring != NULL);
+ if (ring == NULL) {
+ // --gc_at_alloc can get us here before the ring has been initialized.
+ ASSERT(FLAG_gc_at_alloc);
+ return;
+ }
ring->VisitPointers(visitor);
}
« runtime/vm/raw_object.cc ('K') | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698