Index: runtime/vm/snapshot.cc |
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc |
index 135c559d8692a17658f82920549f142a960ae840..c61b6132f844954b2e2c8d64fd0fa616d808de1f 100644 |
--- a/runtime/vm/snapshot.cc |
+++ b/runtime/vm/snapshot.cc |
@@ -2075,7 +2075,7 @@ RawFunction* SnapshotWriter::IsSerializableClosure(RawClass* cls, |
UnmarkAll(); // Unmark objects now as we are about to print stuff. |
intptr_t len = OS::SNPrint(NULL, 0, format, |
clazz.ToCString(), errorFunc.ToCString()) + 1; |
- char* chars = isolate()->current_zone()->Alloc<char>(len); |
+ char* chars = Thread::Current()->zone()->Alloc<char>(len); |
OS::SNPrint(chars, len, format, clazz.ToCString(), errorFunc.ToCString()); |
SetWriteException(Exceptions::kArgument, chars); |
} |
@@ -2104,7 +2104,7 @@ void SnapshotWriter::CheckForNativeFields(RawClass* cls) { |
UnmarkAll(); // Unmark objects now as we are about to print stuff. |
const Class& clazz = Class::Handle(isolate(), cls); |
intptr_t len = OS::SNPrint(NULL, 0, format, clazz.ToCString()) + 1; |
- char* chars = isolate()->current_zone()->Alloc<char>(len); |
+ char* chars = Thread::Current()->zone()->Alloc<char>(len); |
OS::SNPrint(chars, len, format, clazz.ToCString()); |
SetWriteException(Exceptions::kArgument, chars); |
} |