Index: runtime/vm/coverage.cc |
diff --git a/runtime/vm/coverage.cc b/runtime/vm/coverage.cc |
index 65dc7e1d14dc1bca5e8ca8eeabb934db5b01c6a0..73fb5b67ce1d73001f724b8910522a1f8cda2b3e 100644 |
--- a/runtime/vm/coverage.cc |
+++ b/runtime/vm/coverage.cc |
@@ -231,7 +231,7 @@ void CodeCoverage::PrintClass(const Library& lib, |
} |
-void CodeCoverage::Write(Isolate* isolate) { |
+void CodeCoverage::Write(Thread* thread) { |
if (FLAG_coverage_dir == NULL) { |
return; |
} |
@@ -244,12 +244,12 @@ void CodeCoverage::Write(Isolate* isolate) { |
} |
JSONStream stream; |
- PrintJSON(isolate, &stream, NULL, false); |
+ PrintJSON(thread, &stream, NULL, false); |
intptr_t pid = OS::ProcessId(); |
- char* filename = OS::SCreate(Thread::Current()->zone(), |
+ char* filename = OS::SCreate(thread->zone(), |
"%s/dart-cov-%" Pd "-%" Pd64 ".json", |
- FLAG_coverage_dir, pid, isolate->main_port()); |
+ FLAG_coverage_dir, pid, thread->isolate()->main_port()); |
void* file = (*file_open)(filename, true); |
if (file == NULL) { |
OS::Print("Failed to write coverage file: %s\n", filename); |
@@ -260,7 +260,7 @@ void CodeCoverage::Write(Isolate* isolate) { |
} |
-void CodeCoverage::PrintJSON(Isolate* isolate, |
+void CodeCoverage::PrintJSON(Thread* thread, |
JSONStream* stream, |
CoverageFilter* filter, |
bool as_call_sites) { |
@@ -269,7 +269,8 @@ void CodeCoverage::PrintJSON(Isolate* isolate, |
filter = &default_filter; |
} |
const GrowableObjectArray& libs = GrowableObjectArray::Handle( |
- isolate, isolate->object_store()->libraries()); |
+ thread->zone(), |
+ thread->isolate()->object_store()->libraries()); |
Library& lib = Library::Handle(); |
Class& cls = Class::Handle(); |
JSONObject coverage(stream); |