void DynamicArchiveBuilder::sort_methods(InstanceKlass* ik) const {
...
Thread* THREAD = Thread::current();
...
ik->vtable().initialize_vtable(true, THREAD); assert(!HAS_PENDING_EXCEPTION, "cannot fail");
ik->itable().initialize_itable(true, THREAD); assert(!HAS_PENDING_EXCEPTION, "cannot fail");
}
The code works today because the two calls should never throw exceptions (there are no allocations, no loader constraint check, etc).
However, if we change TRAPS to be JavaThread*, we will not be able to do this anymore. (SeeJDK-8252685).
...
Thread* THREAD = Thread::current();
...
ik->vtable().initialize_vtable(true, THREAD); assert(!HAS_PENDING_EXCEPTION, "cannot fail");
ik->itable().initialize_itable(true, THREAD); assert(!HAS_PENDING_EXCEPTION, "cannot fail");
}
The code works today because the two calls should never throw exceptions (there are no allocations, no loader constraint check, etc).
However, if we change TRAPS to be JavaThread*, we will not be able to do this anymore. (See
- relates to
-
JDK-8262280 Incorrect exception handling for VMThread in class redefinition
-
- Resolved
-
-
JDK-8252685 APIs that require JavaThread should take JavaThread arguments
-
- Resolved
-