comparison src/share/vm/prims/jvmtiEnvBase.cpp @ 1144:9b9c1ee9b3f6

Merge
author iveresov
date Wed, 06 Jan 2010 22:21:39 -0800
parents dcb15a6f342d 4ce7240d622c
children c18cbe5936b8
comparison
equal deleted inserted replaced
1129:a5a6adfca6ec 1144:9b9c1ee9b3f6
525 525
526 526
527 JavaThread * 527 JavaThread *
528 JvmtiEnvBase::get_JavaThread(jthread jni_thread) { 528 JvmtiEnvBase::get_JavaThread(jthread jni_thread) {
529 oop t = JNIHandles::resolve_external_guard(jni_thread); 529 oop t = JNIHandles::resolve_external_guard(jni_thread);
530 if (t == NULL || !t->is_a(SystemDictionary::thread_klass())) { 530 if (t == NULL || !t->is_a(SystemDictionary::Thread_klass())) {
531 return NULL; 531 return NULL;
532 } 532 }
533 // The following returns NULL if the thread has not yet run or is in 533 // The following returns NULL if the thread has not yet run or is in
534 // process of exiting 534 // process of exiting
535 return java_lang_Thread::thread(t); 535 return java_lang_Thread::thread(t);
1267 1267
1268 ResourceMark rm; 1268 ResourceMark rm;
1269 for (int i = 0; i < _thread_count; ++i) { 1269 for (int i = 0; i < _thread_count; ++i) {
1270 jthread jt = _thread_list[i]; 1270 jthread jt = _thread_list[i];
1271 oop thread_oop = JNIHandles::resolve_external_guard(jt); 1271 oop thread_oop = JNIHandles::resolve_external_guard(jt);
1272 if (thread_oop == NULL || !thread_oop->is_a(SystemDictionary::thread_klass())) { 1272 if (thread_oop == NULL || !thread_oop->is_a(SystemDictionary::Thread_klass())) {
1273 set_result(JVMTI_ERROR_INVALID_THREAD); 1273 set_result(JVMTI_ERROR_INVALID_THREAD);
1274 return; 1274 return;
1275 } 1275 }
1276 fill_frames(jt, java_lang_Thread::thread(thread_oop), thread_oop); 1276 fill_frames(jt, java_lang_Thread::thread(thread_oop), thread_oop);
1277 } 1277 }