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

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: Fixed import 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') | 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 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);
}
« no previous file with comments | « no previous file | runtime/vm/allocation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698