2664 |
2664 |
2665 _has_finalizer = _has_empty_finalizer = _has_vanilla_constructor = false; |
2665 _has_finalizer = _has_empty_finalizer = _has_vanilla_constructor = false; |
2666 _max_bootstrap_specifier_index = -1; |
2666 _max_bootstrap_specifier_index = -1; |
2667 |
2667 |
2668 if (JvmtiExport::should_post_class_file_load_hook()) { |
2668 if (JvmtiExport::should_post_class_file_load_hook()) { |
2669 // Get the cached class file bytes (if any) from the |
2669 // Get the cached class file bytes (if any) from the class that |
2670 // class that is being redefined. |
2670 // is being redefined or retransformed. We use jvmti_thread_state() |
2671 JvmtiThreadState *state = JvmtiThreadState::state_for(jt); |
2671 // instead of JvmtiThreadState::state_for(jt) so we don't allocate |
2672 KlassHandle *h_class_being_redefined = |
2672 // a JvmtiThreadState any earlier than necessary. This will help |
2673 state->get_class_being_redefined(); |
2673 // avoid the bug described by 7126851. |
2674 if (h_class_being_redefined != NULL) { |
2674 JvmtiThreadState *state = jt->jvmti_thread_state(); |
2675 instanceKlassHandle ikh_class_being_redefined = |
2675 if (state != NULL) { |
2676 instanceKlassHandle(THREAD, (*h_class_being_redefined)()); |
2676 KlassHandle *h_class_being_redefined = |
2677 cached_class_file_bytes = |
2677 state->get_class_being_redefined(); |
2678 ikh_class_being_redefined->get_cached_class_file_bytes(); |
2678 if (h_class_being_redefined != NULL) { |
2679 cached_class_file_length = |
2679 instanceKlassHandle ikh_class_being_redefined = |
2680 ikh_class_being_redefined->get_cached_class_file_len(); |
2680 instanceKlassHandle(THREAD, (*h_class_being_redefined)()); |
|
2681 cached_class_file_bytes = |
|
2682 ikh_class_being_redefined->get_cached_class_file_bytes(); |
|
2683 cached_class_file_length = |
|
2684 ikh_class_being_redefined->get_cached_class_file_len(); |
|
2685 } |
2681 } |
2686 } |
2682 |
2687 |
2683 unsigned char* ptr = cfs->buffer(); |
2688 unsigned char* ptr = cfs->buffer(); |
2684 unsigned char* end_ptr = cfs->buffer() + cfs->length(); |
2689 unsigned char* end_ptr = cfs->buffer() + cfs->length(); |
2685 |
2690 |