diff src/share/vm/prims/jvmtiThreadState.hpp @ 609:ea20d7ce26b0

6800721: 3/4 JavaThread::jvmti_thread_state() and JvmtiThreadState::state_for() robustness Summary: Check for NULL return values from jvmti_thread_state() and state_for() and return a JVM TI error code as appropriate. Reviewed-by: coleenp, swamyv
author dcubed
date Mon, 02 Mar 2009 14:00:23 -0700
parents 0386097d43d8
children 6deeaebad47a
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiThreadState.hpp	Mon Mar 02 13:57:17 2009 -0700
+++ b/src/share/vm/prims/jvmtiThreadState.hpp	Mon Mar 02 14:00:23 2009 -0700
@@ -314,6 +314,7 @@
   void update_for_pop_top_frame();
 
   // already holding JvmtiThreadState_lock - retrieve or create JvmtiThreadState
+  // Can return NULL if JavaThread is exiting.
   inline static JvmtiThreadState *state_for_while_locked(JavaThread *thread) {
     assert(JvmtiThreadState_lock->is_locked(), "sanity check");
 
@@ -330,6 +331,7 @@
   }
 
   // retrieve or create JvmtiThreadState
+  // Can return NULL if JavaThread is exiting.
   inline static JvmtiThreadState *state_for(JavaThread *thread) {
     JvmtiThreadState *state = thread->jvmti_thread_state();
     if (state == NULL) {