mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
use run function to call boot in JNI_CreateJavaVM
boot may throw an exception, which we can't allow to propagate beyond the JNI_CreateJavaVM call.
This commit is contained in:
parent
e20daca297
commit
addaf09aa3
@ -2287,11 +2287,9 @@ append(char** p, const char* value, unsigned length, char tail)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
uint64_t
|
||||||
boot(Thread* t)
|
boot(Thread* t, uintptr_t*)
|
||||||
{
|
{
|
||||||
enter(t, Thread::ActiveState);
|
|
||||||
|
|
||||||
t->javaThread = t->m->classpath->makeThread(t, 0);
|
t->javaThread = t->m->classpath->makeThread(t, 0);
|
||||||
|
|
||||||
setRoot(t, Machine::NullPointerException, makeThrowable
|
setRoot(t, Machine::NullPointerException, makeThrowable
|
||||||
@ -2313,6 +2311,8 @@ boot(Thread* t)
|
|||||||
t->m->classpath->boot(t);
|
t->m->classpath->boot(t);
|
||||||
|
|
||||||
enter(t, Thread::IdleState);
|
enter(t, Thread::IdleState);
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace local
|
} // namespace local
|
||||||
@ -2628,7 +2628,8 @@ JNI_CreateJavaVM(Machine** m, Thread** t, void* args)
|
|||||||
|
|
||||||
*t = p->makeThread(*m, 0, 0);
|
*t = p->makeThread(*m, 0, 0);
|
||||||
|
|
||||||
local::boot(*t);
|
enter(*t, Thread::ActiveState);
|
||||||
|
enter(*t, Thread::IdleState);
|
||||||
|
|
||||||
return 0;
|
return run(*t, local::boot, 0) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user