mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
move call to Classpath::shutDown
We must be in the Active state, not the Exclusive state when calling this method since it may execute arbitrary Java code. This fixes an assertion failure in makeNew.
This commit is contained in:
parent
8995db69d2
commit
dfdd1f6e6c
@ -74,6 +74,11 @@ DetachCurrentThread(Machine* m)
|
||||
uint64_t
|
||||
destroyJavaVM(Thread* t, uintptr_t*)
|
||||
{
|
||||
{ ENTER(t, Thread::ActiveState);
|
||||
|
||||
t->m->classpath->shutDown(t);
|
||||
}
|
||||
|
||||
// wait for other non-daemon threads to exit
|
||||
{ ACQUIRE(t, t->m->stateLock);
|
||||
while (t->m->liveCount - t->m->daemonCount > 1) {
|
||||
|
@ -3324,8 +3324,6 @@ shutDown(Thread* t)
|
||||
|
||||
setRoot(t, Machine::ShutdownHooks, 0);
|
||||
|
||||
t->m->classpath->shutDown(t);
|
||||
|
||||
object h = hooks;
|
||||
PROTECT(t, h);
|
||||
for (; h; h = pairSecond(t, h)) {
|
||||
|
Loading…
Reference in New Issue
Block a user