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

Unified Diff: runtime/lib/mirrors.cc

Issue 1393373003: Remove isolate argument from handle allocation: Part I (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanups 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/lib/math.cc ('k') | runtime/lib/vmservice.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 8e80debb09da2ca3bd9d82cd5b4901555fbbeeb0..7edb1c0f7796ac668a13af7d467d210b23a10fa0 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -580,10 +580,11 @@ static RawInstance* CreateTypeMirror(const AbstractType& type) {
static RawInstance* CreateIsolateMirror() {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
const String& debug_name = String::Handle(String::New(isolate->name()));
- const Library& root_library =
- Library::Handle(isolate, isolate->object_store()->root_library());
+ const Library& root_library = Library::Handle(thread->zone(),
+ isolate->object_store()->root_library());
const Instance& root_library_mirror =
Instance::Handle(CreateLibraryMirror(root_library));
@@ -796,13 +797,13 @@ static RawAbstractType* InstantiateType(const AbstractType& type,
DEFINE_NATIVE_ENTRY(MirrorSystem_libraries, 0) {
const GrowableObjectArray& libraries = GrowableObjectArray::Handle(
- isolate, isolate->object_store()->libraries());
+ zone, isolate->object_store()->libraries());
const intptr_t num_libraries = libraries.Length();
const GrowableObjectArray& library_mirrors = GrowableObjectArray::Handle(
- isolate, GrowableObjectArray::New(num_libraries));
- Library& library = Library::Handle(isolate);
- Instance& library_mirror = Instance::Handle(isolate);
+ zone, GrowableObjectArray::New(num_libraries));
+ Library& library = Library::Handle(zone);
+ Instance& library_mirror = Instance::Handle(zone);
for (int i = 0; i < num_libraries; i++) {
library ^= libraries.At(i);
« no previous file with comments | « runtime/lib/math.cc ('k') | runtime/lib/vmservice.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698