< prev index next >

src/share/vm/runtime/jniHandles.cpp

Print this page

        

@@ -114,11 +114,11 @@
 oop JNIHandles::resolve_jweak(jweak handle) {
   assert(is_jweak(handle), "precondition");
   oop result = jweak_ref(handle);
   result = guard_value<external_guard>(result);
 #if INCLUDE_ALL_GCS
-  if (result != NULL && UseG1GC) {
+  if (result != NULL && (UseG1GC || (UseShenandoahGC && ShenandoahSATBBarrier))) {
     G1SATBCardTableModRefBS::enqueue(result);
   }
 #endif // INCLUDE_ALL_GCS
   return result;
 }

@@ -501,11 +501,11 @@
   int free = 0;
   int blocks = 0;
   for (JNIHandleBlock* current = this; current != NULL; current = current->_next) {
     for (int index = 0; index < current->_top; index++) {
       oop* handle = &(current->_handles)[index];
-      if (*handle ==  JNIHandles::deleted_handle()) {
+      if (*handle == JNIHandles::deleted_handle()) {
         // this handle was cleared out by a delete call, reuse it
         *handle = (oop) _free_list;
         _free_list = handle;
         free++;
       }
< prev index next >