summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_common.cc
diff options
context:
space:
mode:
author Sean Wan <swan@google.com> 2014-07-09 12:08:29 -0700
committer Brian Carlstrom <bdc@google.com> 2014-07-09 16:37:14 -0700
commit7b1cabf3d910f199d77e47f458680f700a31f7e8 (patch)
tree6ce5704191aada30ac2920431c8667593ff1cad9 /runtime/interpreter/interpreter_common.cc
parent62f28f943e2da2873c7a09096c292f01a21c6478 (diff)
CW on Master: Propagate or throw exception when no class found happens in interpreter.
The old behavior is a check fail which causes zygote process crash. This is particular a problem for CW in which webview is not used, and this stops CW system start. (cherry picked from commit 41a71f3db62e5bccb162a2b18ed3801e00ff6f87) Change-Id: Iabe091ebe4bbdd86d931ac6c06abd089f1338d59
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
-rw-r--r--runtime/interpreter/interpreter_common.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc
index c7fb884fa4..9f04b90c55 100644
--- a/runtime/interpreter/interpreter_common.cc
+++ b/runtime/interpreter/interpreter_common.cc
@@ -772,8 +772,13 @@ static void UnstartedRuntimeInvoke(Thread* self, MethodHelper& mh,
// shadow_frame.GetMethod()->GetDeclaringClass()->GetClassLoader();
Class* found = Runtime::Current()->GetClassLinker()->FindClass(
self, descriptor.c_str(), NullHandle<mirror::ClassLoader>());
- CHECK(found != NULL) << "Class.forName failed in un-started runtime for class: "
- << PrettyDescriptor(descriptor);
+ if (found == NULL) {
+ if (!self->IsExceptionPending()) {
+ AbortTransaction(self, "Class.forName failed in un-started runtime for class: %s",
+ PrettyDescriptor(descriptor).c_str());
+ }
+ return;
+ }
result->SetL(found);
} else if (name == "java.lang.Class java.lang.Void.lookupType()") {
result->SetL(Runtime::Current()->GetClassLinker()->FindPrimitiveClass('V'));