Index: runtime/vm/zone.cc |
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc |
index 9afc8c12ffc5d944ffb622d8ad496627d78d4ffb..ee7720604b09dd45f1823fa54dded2f4b792a58f 100644 |
--- a/runtime/vm/zone.cc |
+++ b/runtime/vm/zone.cc |
@@ -216,6 +216,14 @@ void BaseZone::DumpZoneSizes() { |
#endif |
+Zone::Zone() |
+ : StackResource(NULL), |
+ zone_(), |
+ handles_(), |
+ previous_(NULL) { |
+} |
+ |
+ |
Zone::Zone(Isolate* isolate) |
: StackResource(isolate), |
zone_(), |
@@ -230,12 +238,15 @@ Zone::Zone(Isolate* isolate) |
Zone::~Zone() { |
- ASSERT(isolate()->current_zone() == this); |
- isolate()->set_current_zone(previous_); |
+ if (isolate() != NULL) { |
+ ASSERT(isolate()->current_zone() == this); |
+ isolate()->set_current_zone(previous_); |
+ } |
} |
void Zone::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
+ ASSERT(isolate() != NULL); |
Zone* zone = this; |
while (zone != NULL) { |
zone->handles()->VisitObjectPointers(visitor); |