src/hotspot/share/prims/jvmtiRedefineClasses.cpp
changeset 51096 695dff91a997
parent 50735 2f2af62dfac7
child 51329 9c68699bebe5
equal deleted inserted replaced
51095:a8ee31fb99e1 51096:695dff91a997
  4096   the_class->set_inner_classes(scratch_class->inner_classes());
  4096   the_class->set_inner_classes(scratch_class->inner_classes());
  4097   scratch_class->set_inner_classes(old_inner_classes);
  4097   scratch_class->set_inner_classes(old_inner_classes);
  4098 
  4098 
  4099   // Initialize the vtable and interface table after
  4099   // Initialize the vtable and interface table after
  4100   // methods have been rewritten
  4100   // methods have been rewritten
  4101   {
  4101   // no exception should happen here since we explicitly
  4102     ResourceMark rm(THREAD);
  4102   // do not check loader constraints.
  4103     // no exception should happen here since we explicitly
  4103   // compare_and_normalize_class_versions has already checked:
  4104     // do not check loader constraints.
  4104   //  - classloaders unchanged, signatures unchanged
  4105     // compare_and_normalize_class_versions has already checked:
  4105   //  - all instanceKlasses for redefined classes reused & contents updated
  4106     //  - classloaders unchanged, signatures unchanged
  4106   the_class->vtable().initialize_vtable(false, THREAD);
  4107     //  - all instanceKlasses for redefined classes reused & contents updated
  4107   the_class->itable().initialize_itable(false, THREAD);
  4108     the_class->vtable().initialize_vtable(false, THREAD);
  4108   assert(!HAS_PENDING_EXCEPTION || (THREAD->pending_exception()->is_a(SystemDictionary::ThreadDeath_klass())), "redefine exception");
  4109     the_class->itable().initialize_itable(false, THREAD);
       
  4110     assert(!HAS_PENDING_EXCEPTION || (THREAD->pending_exception()->is_a(SystemDictionary::ThreadDeath_klass())), "redefine exception");
       
  4111   }
       
  4112 
  4109 
  4113   // Leave arrays of jmethodIDs and itable index cache unchanged
  4110   // Leave arrays of jmethodIDs and itable index cache unchanged
  4114 
  4111 
  4115   // Copy the "source file name" attribute from new class version
  4112   // Copy the "source file name" attribute from new class version
  4116   the_class->set_source_file_name_index(
  4113   the_class->set_source_file_name_index(