src/share/vm/prims/jvmtiEnvBase.cpp

changeset 1044
ea20d7ce26b0
parent 905
ad8c8ca4ab0f
child 1046
2f716c0acb64
     1.1 --- a/src/share/vm/prims/jvmtiEnvBase.cpp	Mon Mar 02 13:57:17 2009 -0700
     1.2 +++ b/src/share/vm/prims/jvmtiEnvBase.cpp	Mon Mar 02 14:00:23 2009 -0700
     1.3 @@ -1322,6 +1322,12 @@
     1.4    HandleMark   hm(current_thread);
     1.5    uint32_t debug_bits = 0;
     1.6  
     1.7 +  // retrieve or create the state
     1.8 +  JvmtiThreadState* state = JvmtiThreadState::state_for(java_thread);
     1.9 +  if (state == NULL) {
    1.10 +    return JVMTI_ERROR_THREAD_NOT_ALIVE;
    1.11 +  }
    1.12 +
    1.13    // Check if java_thread is fully suspended
    1.14    if (!is_thread_fully_suspended(java_thread,
    1.15                                   true /* wait for suspend completion */,
    1.16 @@ -1329,9 +1335,6 @@
    1.17      return JVMTI_ERROR_THREAD_NOT_SUSPENDED;
    1.18    }
    1.19  
    1.20 -  // retreive or create the state
    1.21 -  JvmtiThreadState* state = JvmtiThreadState::state_for(java_thread);
    1.22 -
    1.23    // Check to see if a ForceEarlyReturn was already in progress
    1.24    if (state->is_earlyret_pending()) {
    1.25      // Probably possible for JVMTI clients to trigger this, but the

mercurial