< prev index next >

src/hotspot/share/prims/jni.cpp

Print this page
rev 47287 : Port 09.17.Thread_SMR_logging_update from JDK9 to JDK10

@@ -4140,11 +4140,11 @@
   thread->set_thread_state(_thread_in_vm);
   thread->record_stack_base_and_size();
   thread->initialize_thread_current();
 
   if (!os::create_attached_thread(thread)) {
-    delete thread;
+    thread->smr_delete();
     return JNI_ERR;
   }
   // Enable stack overflow checks
   thread->create_stack_guard_pages();
 

@@ -4271,11 +4271,11 @@
   // here. The abstraction should be more symmetrically either exposed
   // or hidden (e.g. it could probably be hidden in the same
   // (platform-dependent) methods where we do alternate stack
   // maintenance work?)
   thread->exit(false, JavaThread::jni_detach);
-  delete thread;
+  thread->smr_delete();
 
   HOTSPOT_JNI_DETACHCURRENTTHREAD_RETURN(JNI_OK);
   return JNI_OK;
 }
 
< prev index next >