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

Unified Diff: runtime/vm/coverage.cc

Issue 1310463005: - Ensure that HandleScope is initialized with a thread. (Remove (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 4 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/class_finalizer.cc ('k') | runtime/vm/dart.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 cef020144f688f7a71f6fa0cf02c433f948caa6e..f91eaa9492b232a498937f792d223ed6c330395b 100644
--- a/runtime/vm/coverage.cc
+++ b/runtime/vm/coverage.cc
@@ -72,7 +72,6 @@ void CodeCoverage::CompileAndAdd(const Function& function,
}
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
- Isolate* isolate = thread->isolate();
// Make sure we have the unoptimized code for this function available.
if (Compiler::EnsureUnoptimizedCode(thread, function) != Error::null()) {
// Ignore the error and this function entirely.
@@ -96,7 +95,7 @@ void CodeCoverage::CompileAndAdd(const Function& function,
PcDescriptors::Iterator iter(descriptors,
RawPcDescriptors::kIcCall | RawPcDescriptors::kUnoptStaticCall);
while (iter.MoveNext()) {
- HANDLESCOPE(isolate);
+ HANDLESCOPE(thread);
const ICData* ic_data = (*ic_data_array)[iter.DeoptId()];
if (!ic_data->IsNull()) {
const intptr_t token_pos = iter.TokenPos();
@@ -141,7 +140,8 @@ void CodeCoverage::PrintClass(const Library& lib,
const JSONArray& jsarr,
CoverageFilter* filter,
bool as_call_sites) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
if (cls.EnsureIsFinalized(isolate) != Error::null()) {
// Only classes that have been finalized do have a meaningful list of
// functions.
@@ -156,7 +156,7 @@ void CodeCoverage::PrintClass(const Library& lib,
GrowableArray<intptr_t> pos_to_line;
int i = 0;
while (i < functions.Length()) {
- HANDLESCOPE(isolate);
+ HANDLESCOPE(thread);
function ^= functions.At(i);
script = function.script();
saved_url = script.url();
@@ -201,7 +201,7 @@ void CodeCoverage::PrintClass(const Library& lib,
// We need to keep rechecking the length of the closures array, as handling
// a closure potentially adds new entries to the end.
while (i < closures.Length()) {
- HANDLESCOPE(isolate);
+ HANDLESCOPE(thread);
function ^= closures.At(i);
script = function.script();
saved_url = script.url();
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698