changeset 35571:63e185035789

8147441: Unchecked pending exceptions in the WhiteBox API's implementation Summary: Add checks for pending exceptions. Reviewed-by: kvn
author zmajo
date Mon, 18 Jan 2016 08:50:57 +0100
parents 584ae5cfe100
children 92432f74992f
files hotspot/src/share/vm/prims/whitebox.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Fri Jan 15 13:08:40 2016 -1000
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Mon Jan 18 08:50:57 2016 +0100
@@ -1096,6 +1096,7 @@
 
   CodeBlobStub stub(code);
   jobjectArray codeBlob = codeBlob2objectArray(thread, env, &stub);
+  CHECK_JNI_EXCEPTION_(env, NULL);
   env->SetObjectArrayElement(result, 0, codeBlob);
 
   jobject level = integerBox(thread, env, code->comp_level());
@@ -1181,6 +1182,7 @@
   for (GrowableArrayIterator<CodeBlobStub*> it = blobs.begin();
        it != blobs.end(); ++it) {
     jobjectArray obj = codeBlob2objectArray(thread, env, *it);
+    CHECK_JNI_EXCEPTION_(env, NULL);
     env->SetObjectArrayElement(result, i, obj);
     ++i;
   }