# HG changeset patch # User stefank # Date 1349813545 -7200 # Node ID dd2b66d09ccd5552da8c4a54dacb194d60ec49fa # Parent 04155d9c8c76885f90e95487710882be36b53b86 8000659: NPG: ClassCastExceptions are unexpectedly thrown when testing nashorn Summary: Treat the oops in invoke_method_table() as strong roots when ClassUnloading is enabled. Reviewed-by: kamg, coleenp diff -r 04155d9c8c76 -r dd2b66d09ccd src/share/vm/classfile/systemDictionary.cpp --- a/src/share/vm/classfile/systemDictionary.cpp Mon Oct 08 09:12:31 2012 -0700 +++ b/src/share/vm/classfile/systemDictionary.cpp Tue Oct 09 22:12:25 2012 +0200 @@ -1749,6 +1749,9 @@ blk->do_oop(&_system_loader_lock_obj); dictionary()->always_strong_oops_do(blk); + + // Visit extra methods + invoke_method_table()->oops_do(blk); } void SystemDictionary::always_strong_classes_do(KlassClosure* closure) {