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

Side by Side Diff: runtime/vm/coverage.cc

Issue 1220193009: Migrate most uses of Isolate::current_zone to Thread::zone. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/bitmap.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/coverage.h" 5 #include "vm/coverage.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return; 245 return;
246 } 246 }
247 247
248 JSONStream stream; 248 JSONStream stream;
249 PrintJSON(isolate, &stream, NULL, false); 249 PrintJSON(isolate, &stream, NULL, false);
250 250
251 const char* format = "%s/dart-cov-%" Pd "-%" Pd ".json"; 251 const char* format = "%s/dart-cov-%" Pd "-%" Pd ".json";
252 intptr_t pid = OS::ProcessId(); 252 intptr_t pid = OS::ProcessId();
253 intptr_t len = OS::SNPrint(NULL, 0, format, 253 intptr_t len = OS::SNPrint(NULL, 0, format,
254 FLAG_coverage_dir, pid, isolate->main_port()); 254 FLAG_coverage_dir, pid, isolate->main_port());
255 char* filename = Isolate::Current()->current_zone()->Alloc<char>(len + 1); 255 char* filename = Thread::Current()->zone()->Alloc<char>(len + 1);
256 OS::SNPrint(filename, len + 1, format, 256 OS::SNPrint(filename, len + 1, format,
257 FLAG_coverage_dir, pid, isolate->main_port()); 257 FLAG_coverage_dir, pid, isolate->main_port());
258 void* file = (*file_open)(filename, true); 258 void* file = (*file_open)(filename, true);
259 if (file == NULL) { 259 if (file == NULL) {
260 OS::Print("Failed to write coverage file: %s\n", filename); 260 OS::Print("Failed to write coverage file: %s\n", filename);
261 return; 261 return;
262 } 262 }
263 (*file_write)(stream.buffer()->buf(), stream.buffer()->length(), file); 263 (*file_write)(stream.buffer()->buf(), stream.buffer()->length(), file);
264 (*file_close)(file); 264 (*file_close)(file);
265 } 265 }
(...skipping 22 matching lines...) Expand all
288 cls = it.GetNextClass(); 288 cls = it.GetNextClass();
289 ASSERT(!cls.IsNull()); 289 ASSERT(!cls.IsNull());
290 PrintClass(lib, cls, jsarr, filter, as_call_sites); 290 PrintClass(lib, cls, jsarr, filter, as_call_sites);
291 } 291 }
292 } 292 }
293 } 293 }
294 } 294 }
295 295
296 296
297 } // namespace dart 297 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bitmap.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698