| Index: runtime/lib/mirrors.cc
|
| diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
|
| index 2d5145f98f9152abd735fe9c8c48c2306aa78774..8e80debb09da2ca3bd9d82cd5b4901555fbbeeb0 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();
|
| @@ -597,11 +596,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();
|
| @@ -985,7 +985,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);
|
| }
|
| @@ -1002,7 +1002,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);
|
| }
|
| @@ -1067,7 +1067,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);
|
| }
|
| @@ -1118,7 +1118,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);
|
| }
|
|
|