aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot/.hg/patches/light-updateClassRedefinedCount-java8.patch
blob: 31ca8952e1f73dceeabe08a0827e8dc6c25df9e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff -r 7bb5278e8ce7 src/share/vm/prims/jvmtiRedefineClasses2.cpp
--- a/src/share/vm/prims/jvmtiRedefineClasses2.cpp	Fri Mar 23 15:32:54 2018 +0100
+++ b/src/share/vm/prims/jvmtiRedefineClasses2.cpp	Sat Mar 24 15:49:52 2018 +0100
@@ -1763,8 +1763,8 @@
 
   // increment the classRedefinedCount field in the_class and in any
   // direct and indirect subclasses of the_class
-  increment_class_counter((InstanceKlass *)the_old_class(), THREAD);
-
+  increment_class_counter((InstanceKlass *)the_new_class(), THREAD);
+  
 }
 
 
@@ -1864,10 +1864,10 @@
 
 // Increment the classRedefinedCount field in the specific InstanceKlass
 // and in all direct and indirect subclasses.
-void VM_EnhancedRedefineClasses::increment_class_counter(Klass* klass, TRAPS) {
-  oop class_mirror = klass->java_mirror();
+void VM_EnhancedRedefineClasses::increment_class_counter(Klass* klass, TRAPS) {      
+  oop class_mirror = klass->old_version()->java_mirror();
   int new_count = java_lang_Class::classRedefinedCount(class_mirror) + 1;
-  java_lang_Class::set_classRedefinedCount(class_mirror, new_count);
+  java_lang_Class::set_classRedefinedCount(klass->java_mirror(), new_count);
   RC_TRACE(0x00000008, ("updated count for class=%s to %d", klass->external_name(), new_count));
 }