natClassLoader.cc (_Jv_WaitForState): Call _Jv_PrepareCompiledClass while holding class mutex.

* java/lang/natClassLoader.cc (_Jv_WaitForState): Call
	_Jv_PrepareCompiledClass while holding class mutex.

From-SVN: r29063
This commit is contained in:
Tom Tromey 1999-09-02 19:33:50 +00:00 committed by Tom Tromey
parent 8012c98334
commit 773c6f0076
2 changed files with 9 additions and 2 deletions

View file

@ -144,8 +144,10 @@ _Jv_WaitForState (jclass klass, int state)
if (state == JV_STATE_LINKED)
{
_Jv_MonitorExit (klass);
// Must call _Jv_PrepareCompiledClass while holding the class
// mutex.
_Jv_PrepareCompiledClass (klass);
_Jv_MonitorExit (klass);
return;
}
@ -217,7 +219,7 @@ _Jv_PrepareCompiledClass(jclass klass)
if (klass->state >= JV_STATE_LINKED)
return;
// short-circuit, so that mutually dependent classes are ok
// Short-circuit, so that mutually dependent classes are ok.
klass->state = JV_STATE_LINKED;
_Jv_Constants *pool = &klass->constants;