8147441: Unchecked pending exceptions in the WhiteBox API's implementation

Add checks for pending exceptions.

Reviewed-by: kvn
This commit is contained in:
Zoltan Majo 2016-01-18 08:50:57 +01:00
parent 01f58aa4da
commit 3301846a21

View file

@ -1096,6 +1096,7 @@ WB_ENTRY(jobjectArray, WB_GetNMethod(JNIEnv* env, jobject o, jobject method, jbo
CodeBlobStub stub(code); CodeBlobStub stub(code);
jobjectArray codeBlob = codeBlob2objectArray(thread, env, &stub); jobjectArray codeBlob = codeBlob2objectArray(thread, env, &stub);
CHECK_JNI_EXCEPTION_(env, NULL);
env->SetObjectArrayElement(result, 0, codeBlob); env->SetObjectArrayElement(result, 0, codeBlob);
jobject level = integerBox(thread, env, code->comp_level()); jobject level = integerBox(thread, env, code->comp_level());
@ -1181,6 +1182,7 @@ WB_ENTRY(jobjectArray, WB_GetCodeHeapEntries(JNIEnv* env, jobject o, jint blob_t
for (GrowableArrayIterator<CodeBlobStub*> it = blobs.begin(); for (GrowableArrayIterator<CodeBlobStub*> it = blobs.begin();
it != blobs.end(); ++it) { it != blobs.end(); ++it) {
jobjectArray obj = codeBlob2objectArray(thread, env, *it); jobjectArray obj = codeBlob2objectArray(thread, env, *it);
CHECK_JNI_EXCEPTION_(env, NULL);
env->SetObjectArrayElement(result, i, obj); env->SetObjectArrayElement(result, i, obj);
++i; ++i;
} }