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

Unified Diff: runtime/vm/coverage.cc

Issue 1401643002: Remove isolate parameter when allocating handles (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Sync Created 5 years, 2 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
« no previous file with comments | « runtime/vm/coverage.h ('k') | runtime/vm/coverage_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « runtime/vm/coverage.h ('k') | runtime/vm/coverage_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698