Mercurial > hg > graal-compiler
changeset 12668:e27f3169460e
notify JVMTI about exception throws from runtime
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 04 Nov 2013 21:45:23 -0800 |
parents | bee224687003 |
children | df42ff42279f |
files | src/share/vm/graal/graalRuntime.cpp |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/graal/graalRuntime.cpp Mon Nov 04 21:25:19 2013 +0100 +++ b/src/share/vm/graal/graalRuntime.cpp Mon Nov 04 21:45:23 2013 -0800 @@ -299,13 +299,17 @@ } JRT_ENTRY(void, GraalRuntime::create_null_exception(JavaThread* thread)) - thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_NullPointerException(), NULL)()); + SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_NullPointerException()); + thread->set_vm_result(PENDING_EXCEPTION); + CLEAR_PENDING_EXCEPTION; JRT_END JRT_ENTRY(void, GraalRuntime::create_out_of_bounds_exception(JavaThread* thread, jint index)) char message[jintAsStringSize]; sprintf(message, "%d", index); - thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message)()); + SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message); + thread->set_vm_result(PENDING_EXCEPTION); + CLEAR_PENDING_EXCEPTION; JRT_END JRT_ENTRY_NO_ASYNC(void, GraalRuntime::monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock))