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

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

Issue 1384403002: Preparation for moving reusable handles to thread and more cleanups: isolate -> thread based handle… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixed import 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/class_finalizer.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 } 136 }
137 137
138 138
139 void CodeCoverage::PrintClass(const Library& lib, 139 void CodeCoverage::PrintClass(const Library& lib,
140 const Class& cls, 140 const Class& cls,
141 const JSONArray& jsarr, 141 const JSONArray& jsarr,
142 CoverageFilter* filter, 142 CoverageFilter* filter,
143 bool as_call_sites) { 143 bool as_call_sites) {
144 Thread* thread = Thread::Current(); 144 Thread* thread = Thread::Current();
145 Isolate* isolate = thread->isolate(); 145 if (cls.EnsureIsFinalized(thread) != Error::null()) {
146 if (cls.EnsureIsFinalized(isolate) != Error::null()) {
147 // Only classes that have been finalized do have a meaningful list of 146 // Only classes that have been finalized do have a meaningful list of
148 // functions. 147 // functions.
149 return; 148 return;
150 } 149 }
151 Array& functions = Array::Handle(cls.functions()); 150 Array& functions = Array::Handle(cls.functions());
152 ASSERT(!functions.IsNull()); 151 ASSERT(!functions.IsNull());
153 Function& function = Function::Handle(); 152 Function& function = Function::Handle();
154 Script& script = Script::Handle(); 153 Script& script = Script::Handle();
155 String& saved_url = String::Handle(); 154 String& saved_url = String::Handle();
156 String& url = String::Handle(); 155 String& url = String::Handle();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 cls = it.GetNextClass(); 283 cls = it.GetNextClass();
285 ASSERT(!cls.IsNull()); 284 ASSERT(!cls.IsNull());
286 PrintClass(lib, cls, jsarr, filter, as_call_sites); 285 PrintClass(lib, cls, jsarr, filter, as_call_sites);
287 } 286 }
288 } 287 }
289 } 288 }
290 } 289 }
291 290
292 291
293 } // namespace dart 292 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698