8147441: Unchecked pending exceptions in the WhiteBox API's implementation
Summary: Add checks for pending exceptions.
Reviewed-by: kvn
--- 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;
}