| 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);
|
| }
|
|
|