Mercurial > hg > truffle
diff src/share/vm/prims/jvmtiEnvBase.hpp @ 17474:6fa574bfd32a
Merge
author | chegar |
---|---|
date | Thu, 03 Oct 2013 19:13:12 +0100 |
parents | c1d7040a1183 |
children | de6a9e811145 |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiEnvBase.hpp Sat Sep 14 20:40:34 2013 +0100 +++ b/src/share/vm/prims/jvmtiEnvBase.hpp Thu Oct 03 19:13:12 2013 +0100 @@ -406,7 +406,11 @@ VMOp_Type type() const { return VMOp_GetCurrentContendedMonitor; } jvmtiError result() { return _result; } void doit() { - _result = ((JvmtiEnvBase *)_env)->get_current_contended_monitor(_calling_thread,_java_thread,_owned_monitor_ptr); + _result = JVMTI_ERROR_THREAD_NOT_ALIVE; + if (Threads::includes(_java_thread) && !_java_thread->is_exiting() && + _java_thread->threadObj() != NULL) { + _result = ((JvmtiEnvBase *)_env)->get_current_contended_monitor(_calling_thread,_java_thread,_owned_monitor_ptr); + } } };