Clear exception if FindClass fails.
Test: verifier_deps_test.
bug: 30937355
Change-Id: I9916ec00010de012939462d4f30147e8b64fe279
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index b6b2575..d1a5c4d 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -2077,6 +2077,9 @@
if (cls.Get() != nullptr) {
ObjectLock<mirror::Class> lock(soa.Self(), cls);
mirror::Class::SetStatus(cls, mirror::Class::kStatusVerified, soa.Self());
+ } else {
+ DCHECK(soa.Self()->IsExceptionPending());
+ soa.Self()->ClearException();
}
// Create `VerifiedMethod`s for each methods, the compiler expects one for
// quickening or compiling.