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

Unified Diff: runtime/lib/mirrors.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: 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 | « no previous file | runtime/vm/allocation.h » ('j') | runtime/vm/gc_marker.h » ('J')
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 65f7c62a632144bc2546d5bed4871b517e0a4a85..955aff44c94076ecbc3210fa9c64b8bfd8dd5fb9 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -91,8 +91,7 @@ static void EnsureConstructorsAreCompiled(const Function& func) {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
const Class& cls = Class::Handle(zone, func.Owner());
- const Error& error = Error::Handle(
- zone, cls.EnsureIsFinalized(thread->isolate()));
+ const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
UNREACHABLE();
@@ -345,7 +344,7 @@ static RawInstance* CreateClassMirror(const Class& cls,
}
}
- const Error& error = Error::Handle(cls.EnsureIsFinalized(Isolate::Current()));
+ const Error& error = Error::Handle(cls.EnsureIsFinalized(Thread::Current()));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
UNREACHABLE();
@@ -589,11 +588,12 @@ static RawInstance* CreateIsolateMirror() {
static void VerifyMethodKindShifts() {
#ifdef DEBUG
- Isolate* isolate = Isolate::Current();
- const Library& lib = Library::Handle(isolate, Library::MirrorsLibrary());
- const Class& cls = Class::Handle(isolate,
+ Thread* thread = Thread::Current();
+ Zone* zone = thread->zone();
+ const Library& lib = Library::Handle(zone, Library::MirrorsLibrary());
+ const Class& cls = Class::Handle(zone,
lib.LookupClassAllowPrivate(Symbols::_LocalMethodMirror()));
- const Error& error = Error::Handle(isolate, cls.EnsureIsFinalized(isolate));
+ const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread));
ASSERT(error.IsNull());
Field& field = Field::Handle();
@@ -977,7 +977,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_interfaces, 1) {
UNREACHABLE();
}
const Class& cls = Class::Handle(type.type_class());
- const Error& error = Error::Handle(cls.EnsureIsFinalized(isolate));
+ const Error& error = Error::Handle(cls.EnsureIsFinalized(thread));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
}
@@ -994,7 +994,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_interfaces_instantiated, 1) {
UNREACHABLE();
}
const Class& cls = Class::Handle(type.type_class());
- const Error& error = Error::Handle(cls.EnsureIsFinalized(isolate));
+ const Error& error = Error::Handle(cls.EnsureIsFinalized(thread));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
}
@@ -1059,7 +1059,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_members, 3) {
GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(2));
const Class& klass = Class::Handle(ref.GetClassReferent());
- const Error& error = Error::Handle(klass.EnsureIsFinalized(isolate));
+ const Error& error = Error::Handle(klass.EnsureIsFinalized(thread));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
}
@@ -1110,7 +1110,7 @@ DEFINE_NATIVE_ENTRY(ClassMirror_constructors, 3) {
GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(2));
const Class& klass = Class::Handle(ref.GetClassReferent());
- const Error& error = Error::Handle(klass.EnsureIsFinalized(isolate));
+ const Error& error = Error::Handle(klass.EnsureIsFinalized(thread));
if (!error.IsNull()) {
Exceptions::PropagateError(error);
}
« no previous file with comments | « no previous file | runtime/vm/allocation.h » ('j') | runtime/vm/gc_marker.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698