7195867: NPG: SAJDI tests fail with sun.jvm.hotspot.types.WrongTypeException: No suitable match for type

Need to restore the vtable in metadata when we restore the type from the shared archive.

Reviewed-by: acorn, jcoomes, jmasa, jrose
This commit is contained in:
Coleen Phillimore 2012-09-05 20:08:08 -04:00
parent f3b6368c39
commit 8536f548db
6 changed files with 22 additions and 4 deletions

View file

@ -2165,6 +2165,8 @@ void InstanceKlass::restore_unshareable_info(TRAPS) {
for (int index2 = 0; index2 < num_methods; ++index2) {
methodHandle m(THREAD, methods->at(index2));
m()->link_method(m, CHECK);
// restore method's vtable by calling a virtual function
m->restore_vtable();
}
if (JvmtiExport::has_redefined_a_class()) {
// Reinitialize vtable because RedefineClasses may have changed some