Change some pending OOME asserts to be pending exception
There may be non OOM exceptions like StackOverflowError.
Regression test infeasible.
Bug: 36290957
Test: test-art-host
Change-Id: I7128c78fc57a9a709b32b947e3741adc29a846cc
diff --git a/runtime/reflection.cc b/runtime/reflection.cc
index 3c64d40..87bc7df 100644
--- a/runtime/reflection.cc
+++ b/runtime/reflection.cc
@@ -671,14 +671,14 @@
soa.Self()->ClearException();
jclass exception_class = soa.Env()->FindClass("java/lang/reflect/InvocationTargetException");
if (exception_class == nullptr) {
- soa.Self()->AssertPendingOOMException();
+ soa.Self()->AssertPendingException();
return nullptr;
}
jmethodID mid = soa.Env()->GetMethodID(exception_class, "<init>", "(Ljava/lang/Throwable;)V");
CHECK(mid != nullptr);
jobject exception_instance = soa.Env()->NewObject(exception_class, mid, th);
if (exception_instance == nullptr) {
- soa.Self()->AssertPendingOOMException();
+ soa.Self()->AssertPendingException();
return nullptr;
}
soa.Env()->Throw(reinterpret_cast<jthrowable>(exception_instance));