src/share/vm/prims/jvmtiEnvBase.cpp

changeset 1044
ea20d7ce26b0
parent 905
ad8c8ca4ab0f
child 1046
2f716c0acb64
equal deleted inserted replaced
1043:0386097d43d8 1044:ea20d7ce26b0
1320 JvmtiEnvBase::force_early_return(JavaThread* java_thread, jvalue value, TosState tos) { 1320 JvmtiEnvBase::force_early_return(JavaThread* java_thread, jvalue value, TosState tos) {
1321 JavaThread* current_thread = JavaThread::current(); 1321 JavaThread* current_thread = JavaThread::current();
1322 HandleMark hm(current_thread); 1322 HandleMark hm(current_thread);
1323 uint32_t debug_bits = 0; 1323 uint32_t debug_bits = 0;
1324 1324
1325 // retrieve or create the state
1326 JvmtiThreadState* state = JvmtiThreadState::state_for(java_thread);
1327 if (state == NULL) {
1328 return JVMTI_ERROR_THREAD_NOT_ALIVE;
1329 }
1330
1325 // Check if java_thread is fully suspended 1331 // Check if java_thread is fully suspended
1326 if (!is_thread_fully_suspended(java_thread, 1332 if (!is_thread_fully_suspended(java_thread,
1327 true /* wait for suspend completion */, 1333 true /* wait for suspend completion */,
1328 &debug_bits)) { 1334 &debug_bits)) {
1329 return JVMTI_ERROR_THREAD_NOT_SUSPENDED; 1335 return JVMTI_ERROR_THREAD_NOT_SUSPENDED;
1330 } 1336 }
1331
1332 // retreive or create the state
1333 JvmtiThreadState* state = JvmtiThreadState::state_for(java_thread);
1334 1337
1335 // Check to see if a ForceEarlyReturn was already in progress 1338 // Check to see if a ForceEarlyReturn was already in progress
1336 if (state->is_earlyret_pending()) { 1339 if (state->is_earlyret_pending()) {
1337 // Probably possible for JVMTI clients to trigger this, but the 1340 // Probably possible for JVMTI clients to trigger this, but the
1338 // JPDA backend shouldn't allow this to happen 1341 // JPDA backend shouldn't allow this to happen

mercurial