Index: runtime/vm/compiler.cc |
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
index 666a47b2739cbf04310e8b40bf2bac9009ef8dc6..f93657b97e142cbb93972840fa2ca69f4d15782c 100644 |
--- a/runtime/vm/compiler.cc |
+++ b/runtime/vm/compiler.cc |
@@ -215,10 +215,10 @@ static void AddRelatedClassesToList( |
const Class& cls, |
GrowableHandlePtrArray<const Class>* parse_list, |
GrowableHandlePtrArray<const Class>* patch_list) { |
- Isolate* isolate = Isolate::Current(); |
- Class& parse_class = Class::Handle(isolate); |
- AbstractType& interface_type = Type::Handle(isolate); |
- Array& interfaces = Array::Handle(isolate); |
+ Zone* zone = Thread::Current()->zone(); |
+ Class& parse_class = Class::Handle(zone); |
+ AbstractType& interface_type = Type::Handle(zone); |
+ Array& interfaces = Array::Handle(zone); |
// Add all the interfaces implemented by the class that have not been |
// already parsed to the parse list. Mark the interface as parsed so that |
@@ -281,8 +281,9 @@ RawError* Compiler::CompileClass(const Class& cls) { |
ClassFinalizer::FinalizeClass(cls); |
return Error::null(); |
} else { |
- Isolate* isolate = Isolate::Current(); |
- Error& error = Error::Handle(isolate); |
+ Thread* thread = Thread::Current(); |
+ Isolate* isolate = thread->isolate(); |
+ Error& error = Error::Handle(thread->zone()); |
error = isolate->object_store()->sticky_error(); |
isolate->object_store()->clear_sticky_error(); |
return error.raw(); |
@@ -365,7 +366,7 @@ RawError* Compiler::CompileClass(const Class& cls) { |
parse_class.reset_is_marked_for_parsing(); |
} |
} |
- Error& error = Error::Handle(isolate); |
+ Error& error = Error::Handle(zone.GetZone()); |
error = isolate->object_store()->sticky_error(); |
isolate->object_store()->clear_sticky_error(); |
return error.raw(); |
@@ -1552,8 +1553,8 @@ void BackgroundCompiler::EnsureInit(Isolate* isolate) { |
if (isolate->background_compiler() == NULL) { |
BackgroundCompiler* task = new BackgroundCompiler(isolate); |
isolate->set_background_compiler(task); |
- isolate->set_background_compilation_queue( |
- GrowableObjectArray::Handle(isolate, GrowableObjectArray::New())); |
+ isolate->set_background_compilation_queue(GrowableObjectArray::Handle( |
+ isolate->current_zone(), GrowableObjectArray::New())); |
start_task = true; |
} |
} |