equal
deleted
inserted
replaced
47 #include "oops/oop.inline.hpp" |
47 #include "oops/oop.inline.hpp" |
48 #include "oops/symbol.hpp" |
48 #include "oops/symbol.hpp" |
49 #include "prims/jvmtiExport.hpp" |
49 #include "prims/jvmtiExport.hpp" |
50 #include "prims/jvmtiRedefineClassesTrace.hpp" |
50 #include "prims/jvmtiRedefineClassesTrace.hpp" |
51 #include "prims/jvmtiRedefineClasses.hpp" |
51 #include "prims/jvmtiRedefineClasses.hpp" |
|
52 #include "prims/jvmtiThreadState.hpp" |
52 #include "prims/methodComparator.hpp" |
53 #include "prims/methodComparator.hpp" |
53 #include "runtime/fieldDescriptor.hpp" |
54 #include "runtime/fieldDescriptor.hpp" |
54 #include "runtime/handles.inline.hpp" |
55 #include "runtime/handles.inline.hpp" |
55 #include "runtime/javaCalls.hpp" |
56 #include "runtime/javaCalls.hpp" |
56 #include "runtime/mutexLocker.hpp" |
57 #include "runtime/mutexLocker.hpp" |
860 } |
861 } |
861 else { |
862 else { |
862 // Step 10 and 11 |
863 // Step 10 and 11 |
863 Handle e(THREAD, PENDING_EXCEPTION); |
864 Handle e(THREAD, PENDING_EXCEPTION); |
864 CLEAR_PENDING_EXCEPTION; |
865 CLEAR_PENDING_EXCEPTION; |
|
866 // JVMTI has already reported the pending exception |
|
867 // JVMTI internal flag reset is needed in order to report ExceptionInInitializerError |
|
868 JvmtiExport::clear_detected_exception((JavaThread*)THREAD); |
865 { |
869 { |
866 EXCEPTION_MARK; |
870 EXCEPTION_MARK; |
867 this_oop->set_initialization_state_and_notify(initialization_error, THREAD); |
871 this_oop->set_initialization_state_and_notify(initialization_error, THREAD); |
868 CLEAR_PENDING_EXCEPTION; // ignore any exception thrown, class initialization error is thrown below |
872 CLEAR_PENDING_EXCEPTION; // ignore any exception thrown, class initialization error is thrown below |
|
873 // JVMTI has already reported the pending exception |
|
874 // JVMTI internal flag reset is needed in order to report ExceptionInInitializerError |
|
875 JvmtiExport::clear_detected_exception((JavaThread*)THREAD); |
869 } |
876 } |
870 DTRACE_CLASSINIT_PROBE_WAIT(error, InstanceKlass::cast(this_oop()), -1,wait); |
877 DTRACE_CLASSINIT_PROBE_WAIT(error, InstanceKlass::cast(this_oop()), -1,wait); |
871 if (e->is_a(SystemDictionary::Error_klass())) { |
878 if (e->is_a(SystemDictionary::Error_klass())) { |
872 THROW_OOP(e()); |
879 THROW_OOP(e()); |
873 } else { |
880 } else { |