Avoid a case of eager initialization.
Don't mark as initialized classes that contain static field
initialization.
Change-Id: Iedcabbdf355e8861eb7731650eee1467f68ae0cd
diff --git a/src/oat/runtime/support_stubs.cc b/src/oat/runtime/support_stubs.cc
index 8727a5d..5f7d635 100644
--- a/src/oat/runtime/support_stubs.cc
+++ b/src/oat/runtime/support_stubs.cc
@@ -141,7 +141,7 @@
if (LIKELY(called->IsDirect() == !is_virtual)) {
// Ensure that the called method's class is initialized.
Class* called_class = called->GetDeclaringClass();
- linker->EnsureInitialized(called_class, true);
+ linker->EnsureInitialized(called_class, true, true);
if (LIKELY(called_class->IsInitialized())) {
code = called->GetCode();
} else if (called_class->IsInitializing()) {