8223796: JVMCIEnv::get_jvmci_type does not keep klasses alive

Reviewed-by: iveresov, eosterlund
This commit is contained in:
Vladimir Kozlov 2019-06-12 10:37:35 -07:00
parent 5b9c330db8
commit 919c0e9d8e

View File

@ -1111,13 +1111,6 @@ JVMCIObject JVMCIEnv::get_jvmci_type(const JVMCIKlassHandle& klass, JVMCI_TRAPS)
if (klass.is_null()) {
return type;
}
#ifdef INCLUDE_ALL_GCS
if (UseG1GC) {
// The klass might have come from a weak location so enqueue
// the Class to make sure it's noticed by G1
G1SATBCardTableModRefBS::enqueue(klass()->java_mirror());
}
#endif // Klass* don't require tracking as Metadata*
jlong pointer = (jlong) klass();
JavaThread* THREAD = JavaThread::current();