changeset 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 04155d9c8c76
children 4202510ee0fe
files src/share/vm/classfile/systemDictionary.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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) {