Merge pull request #223 from dicej/findclass

initialize class in JNIEnv::FindClass
This commit is contained in:
Joshua Warner 2014-04-08 16:32:08 -06:00
commit 92f63b662e

View File

@ -349,12 +349,16 @@ findClass(Thread* t, uintptr_t* arguments)
object caller = getCaller(t, 0);
return reinterpret_cast<uint64_t>
(makeLocalReference
(t, getJClass
(t, resolveClass
(t, caller ? classLoader(t, methodClass(t, caller))
: root(t, Machine::AppLoader), n))));
object c = resolveClass(t,
caller ? classLoader(t, methodClass(t, caller))
: root(t, Machine::AppLoader),
n);
PROTECT(t, c);
initClass(t, c);
return reinterpret_cast<uint64_t>(makeLocalReference(t, getJClass(t, c)));
}
jclass JNICALL