enter active state before generating stack trace in Thread.getTrace

This commit is contained in:
Joel Dice 2008-04-15 23:27:42 -06:00
parent 479c48f1dd
commit 95e5f8203c

View File

@ -713,6 +713,8 @@ Java_java_lang_Thread_interrupt(Thread* t, jclass, jlong peer)
extern "C" JNIEXPORT jobject JNICALL
Java_java_lang_Thread_getTrace(Thread* t, jclass, jlong peer)
{
ENTER(t, Thread::ActiveState);
if (reinterpret_cast<Thread*>(peer) == t) {
return makeLocalReference(t, makeTrace(t));
} else {