8147441: Unchecked pending exceptions in the WhiteBox API's implementation
authorzmajo
Mon, 18 Jan 2016 08:50:57 +0100
changeset 35571 63e185035789
parent 35570 584ae5cfe100
child 35575 92432f74992f
8147441: Unchecked pending exceptions in the WhiteBox API's implementation Summary: Add checks for pending exceptions. Reviewed-by: kvn
hotspot/src/share/vm/prims/whitebox.cpp
--- 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;
   }