From 0ad10cf3691d232bd76e7d5bf7c5e8be7c77a6c5 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Thu, 3 Jun 2021 18:17:15 +0800 Subject: [PATCH] [core] Check pending exception (#724) --- core/src/main/cpp/main/include/art/runtime/hidden_api.h | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/cpp/main/include/art/runtime/hidden_api.h b/core/src/main/cpp/main/include/art/runtime/hidden_api.h index 2d2adf58..5b629140 100644 --- a/core/src/main/cpp/main/include/art/runtime/hidden_api.h +++ b/core/src/main/cpp/main/include/art/runtime/hidden_api.h @@ -40,6 +40,7 @@ namespace art { inline void maybeSetTrusted(JNIEnv *env, jclass clazz, jobject class_loader, jobject j_cookie) { + if (env->ExceptionCheck()) return; static auto get_parent = env->GetMethodID(env->FindClass("java/lang/ClassLoader"), "getParent", "()Ljava/lang/ClassLoader;"); for (auto current = lspd::Context::GetInstance()->GetCurrentClassLoader();