diff options
author | 2012-10-04 10:09:15 -0700 | |
---|---|---|
committer | 2012-10-05 11:07:39 -0700 | |
commit | 50b35e2fd1a68cd1240e4a9d9f363e11764957d1 (patch) | |
tree | 4f3c58b7b293380f19e4f33357cb352e3330772e /src/native/java_lang_Class.cc | |
parent | 8e9a1497f0d7da4d55f6e7ed8a7d96ba6db7222d (diff) |
Explicitly pass Thread::Current to MutexLock and Alloc.
Change-Id: I8b75bc0617915465f102815b32306aa7760dcae4
Diffstat (limited to 'src/native/java_lang_Class.cc')
-rw-r--r-- | src/native/java_lang_Class.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/native/java_lang_Class.cc b/src/native/java_lang_Class.cc index c023b7e2da..488df80e65 100644 --- a/src/native/java_lang_Class.cc +++ b/src/native/java_lang_Class.cc @@ -199,7 +199,8 @@ static jobjectArray Class_getDeclaredMethods(JNIEnv* env, jclass javaClass, jboo AbstractMethod* m = c->GetVirtualMethod(i); mh.ChangeMethod(m); if (IsVisibleMethod(m, publicOnly)) { - if (mh.GetReturnType() == NULL || mh.GetParameterTypes() == NULL) { + // TODO: the use of GetParameterTypes creates an unused array here. + if (mh.GetReturnType() == NULL || mh.GetParameterTypes(soa.Self()) == NULL) { DCHECK(env->ExceptionOccurred()); return NULL; } @@ -213,7 +214,8 @@ static jobjectArray Class_getDeclaredMethods(JNIEnv* env, jclass javaClass, jboo AbstractMethod* m = c->GetDirectMethod(i); mh.ChangeMethod(m); if (IsVisibleMethod(m, publicOnly)) { - if (mh.GetReturnType() == NULL || mh.GetParameterTypes() == NULL) { + // TODO: the use of GetParameterTypes creates an unused array here. + if (mh.GetReturnType() == NULL || mh.GetParameterTypes(soa.Self()) == NULL) { DCHECK(env->ExceptionOccurred()); return NULL; } @@ -349,7 +351,7 @@ static jstring Class_getNameNative(JNIEnv* env, jobject javaThis) { static jobjectArray Class_getProxyInterfaces(JNIEnv* env, jobject javaThis) { ScopedObjectAccess soa(env); SynthesizedProxyClass* c = down_cast<SynthesizedProxyClass*>(DecodeClass(soa, javaThis)); - return soa.AddLocalReference<jobjectArray>(c->GetInterfaces()->Clone()); + return soa.AddLocalReference<jobjectArray>(c->GetInterfaces()->Clone(soa.Self())); } static jboolean Class_isAssignableFrom(JNIEnv* env, jobject javaLhs, jclass javaRhs) { @@ -412,7 +414,7 @@ static jobject Class_newInstanceImpl(JNIEnv* env, jobject javaThis) { return NULL; } - Object* new_obj = c->AllocObject(); + Object* new_obj = c->AllocObject(soa.Self()); if (new_obj == NULL) { DCHECK(soa.Self()->IsExceptionPending()); return NULL; |