--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp Thu Jun 20 07:56:28 2019 -0700
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp Thu Jun 20 10:32:25 2019 -0700
@@ -2416,7 +2416,7 @@
if (peerEnv->is_hotspot()) {
// Only the mirror in the HotSpot heap is accessible
// through JVMCINMethodData
- oop nmethod_mirror = data->get_nmethod_mirror(nm);
+ oop nmethod_mirror = data->get_nmethod_mirror(nm, /* phantom_ref */ true);
if (nmethod_mirror != NULL) {
result = HotSpotJVMCI::wrap(nmethod_mirror);
}
@@ -2443,7 +2443,7 @@
if (data == NULL) {
JVMCI_THROW_MSG_0(IllegalArgumentException, "Cannot set HotSpotNmethod mirror for default nmethod");
}
- if (data->get_nmethod_mirror(nm) != NULL) {
+ if (data->get_nmethod_mirror(nm, /* phantom_ref */ false) != NULL) {
JVMCI_THROW_MSG_0(IllegalArgumentException, "Cannot overwrite existing HotSpotNmethod mirror for nmethod");
}
oop nmethod_mirror = HotSpotJVMCI::resolve(result);