--- a/src/hotspot/share/runtime/javaCalls.cpp Wed Nov 13 11:27:50 2019 +0000
+++ b/src/hotspot/share/runtime/javaCalls.cpp Wed Nov 13 08:23:23 2019 -0500
@@ -186,7 +186,7 @@
LinkInfo link_info(spec_klass, name, signature);
LinkResolver::resolve_virtual_call(
callinfo, receiver, recvrKlass, link_info, true, CHECK);
- methodHandle method = callinfo.selected_method();
+ methodHandle method(THREAD, callinfo.selected_method());
assert(method.not_null(), "should have thrown exception");
// Invoke the method
@@ -222,7 +222,7 @@
CallInfo callinfo;
LinkInfo link_info(klass, name, signature);
LinkResolver::resolve_special_call(callinfo, args->receiver(), link_info, CHECK);
- methodHandle method = callinfo.selected_method();
+ methodHandle method(THREAD, callinfo.selected_method());
assert(method.not_null(), "should have thrown exception");
// Invoke the method
@@ -257,7 +257,7 @@
CallInfo callinfo;
LinkInfo link_info(klass, name, signature);
LinkResolver::resolve_static_call(callinfo, link_info, true, CHECK);
- methodHandle method = callinfo.selected_method();
+ methodHandle method(THREAD, callinfo.selected_method());
assert(method.not_null(), "should have thrown exception");
// Invoke the method