src/hotspot/share/jvmci/jvmciCompiler.cpp
changeset 59056 15936b142f86
parent 58177 4932dce35882
--- a/src/hotspot/share/jvmci/jvmciCompiler.cpp	Wed Nov 13 11:27:50 2019 +0000
+++ b/src/hotspot/share/jvmci/jvmciCompiler.cpp	Wed Nov 13 08:23:23 2019 -0500
@@ -67,7 +67,7 @@
   // Initialize compile queue with a selected set of methods.
   int len = objectMethods->length();
   for (int i = 0; i < len; i++) {
-    methodHandle mh = objectMethods->at(i);
+    methodHandle mh(THREAD, objectMethods->at(i));
     if (!mh->is_native() && !mh->is_static() && !mh->is_initializer()) {
       ResourceMark rm;
       int hot_count = 10; // TODO: what's the appropriate value?
@@ -100,7 +100,7 @@
   JVMCI::compiler_runtime()->bootstrap_finished(CHECK);
 }
 
-bool JVMCICompiler::force_comp_at_level_simple(Method *method) {
+bool JVMCICompiler::force_comp_at_level_simple(const methodHandle& method) {
   if (UseJVMCINativeLibrary) {
     // This mechanism exists to force compilation of a JVMCI compiler by C1
     // to reduces the compilation time spent on the JVMCI compiler itself. In