3978 } |
3978 } |
3979 else if (scratch_class->get_cached_class_file_bytes() != |
3979 else if (scratch_class->get_cached_class_file_bytes() != |
3980 the_class->get_cached_class_file_bytes()) { |
3980 the_class->get_cached_class_file_bytes()) { |
3981 // The same class can be present twice in the scratch classes list or there |
3981 // The same class can be present twice in the scratch classes list or there |
3982 // are multiple concurrent RetransformClasses calls on different threads. |
3982 // are multiple concurrent RetransformClasses calls on different threads. |
3983 // In such cases we have to deallocate scratch_class cached_class_file_bytes. |
3983 // In such cases we have to deallocate scratch_class cached_class_file. |
3984 os::free(scratch_class->get_cached_class_file_bytes()); |
3984 os::free(scratch_class->get_cached_class_file()); |
3985 } |
3985 } |
3986 |
3986 |
3987 // NULL out in scratch class to not delete twice. The class to be redefined |
3987 // NULL out in scratch class to not delete twice. The class to be redefined |
3988 // always owns these bytes. |
3988 // always owns these bytes. |
3989 scratch_class->set_cached_class_file(NULL); |
3989 scratch_class->set_cached_class_file(NULL); |