< prev index next >

src/share/vm/code/nmethod.cpp

Print this page
rev 8961 : [mq]: diff-shenandoah.patch

@@ -898,11 +898,13 @@
   if (handle == NULL ||
       // As a special case, IC oops are initialized to 1 or -1.
       handle == (jobject) Universe::non_oop_word()) {
     (*dest) = (oop) handle;
   } else {
-    (*dest) = JNIHandles::resolve_non_null(handle);
+    oop obj = JNIHandles::resolve_non_null(handle);
+    assert(obj == oopDesc::bs()->resolve_and_maybe_copy_oop(obj), "expect to-space copy");
+    (*dest) = obj;
   }
 }
 
 
 // Have to have the same name because it's called by a template
< prev index next >