Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceKlass.cpp @ 14481:016b6a289fc4
4505697: nsk/jdi/ExceptionEvent/_itself_/exevent006 and exevent008 tests fail with InvocationTargetException
Reviewed-by: dcubed, dholmes, sspitsyn
author | jbachorik |
---|---|
date | Mon, 24 Feb 2014 10:28:22 +0100 |
parents | 28f281e8de1d |
children | 7d30d4f37d31 |
comparison
equal
deleted
inserted
replaced
14480:61ab121722b8 | 14481:016b6a289fc4 |
---|---|
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 { |