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

Unified Diff: runtime/vm/handles_impl.h

Issue 1242343002: Remove more uses of Isolate::current_zone. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Access isolate via thread. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/handles.cc ('k') | runtime/vm/native_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/handles_impl.h
diff --git a/runtime/vm/handles_impl.h b/runtime/vm/handles_impl.h
index 370b34e440d7dee6a03f6097477a67599f4ed1bd..ad005bb8d60172df8a37a390fbdf73bf7c9dc288 100644
--- a/runtime/vm/handles_impl.h
+++ b/runtime/vm/handles_impl.h
@@ -123,18 +123,18 @@ uword Handles<kHandleSizeInWords,
}
-// Figure out the current zone using the current Isolate and
+// Figure out the current zone using the current Thread and
// check if the specified handle has been allocated in this zone.
template <int kHandleSizeInWords, int kHandlesPerChunk, int kOffsetOfRawPtr>
bool Handles<kHandleSizeInWords,
kHandlesPerChunk,
kOffsetOfRawPtr>::IsZoneHandle(uword handle) {
- // TODO(5411412): Accessing the current isolate is a performance problem,
+ // TODO(5411412): Accessing the current thread is a performance problem,
// consider passing it down as a parameter.
- Isolate* isolate = Isolate::Current();
- ASSERT(isolate != NULL);
- ASSERT(isolate->current_zone() != NULL);
- Handles* handles = isolate->current_zone()->handles();
+ Thread* thread = Thread::Current();
+ ASSERT(thread != NULL);
+ ASSERT(thread->zone() != NULL);
+ Handles* handles = thread->zone()->handles();
ASSERT(handles != NULL);
return handles->IsValidZoneHandle(handle);
}
« no previous file with comments | « runtime/vm/handles.cc ('k') | runtime/vm/native_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698