diff src/share/vm/classfile/systemDictionary.cpp @ 6864:dd2b66d09ccd

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
author stefank
date Tue, 09 Oct 2012 22:12:25 +0200
parents f6b0eb4e44cf
children 633ba56cb013
line wrap: on
line diff
--- 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) {