summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sebastien Hertz <shertz@google.com> 2014-08-27 15:32:56 +0200
committer Sebastien Hertz <shertz@google.com> 2014-08-28 10:53:15 +0200
commitae94e350f100207359b8345d8d21e78e7cfb44c4 (patch)
tree31d11bd22ca174488ae0946d2e84a2a3b3a2483e
parent9c18858899738f79e75b5a31a96b91c8bfa8bdd7 (diff)
Ensure proxy constructor is in dex cache
Bug: 17262039 Change-Id: I879341fa9c66f18ec64d6d4bf6a222a452c27739
-rw-r--r--runtime/class_linker.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 4123fc6398..d8f01db776 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3776,6 +3776,10 @@ mirror::ArtMethod* ClassLinker::CreateProxyConstructor(Thread* self,
proxy_class->GetDirectMethods();
CHECK_EQ(proxy_direct_methods->GetLength(), 16);
mirror::ArtMethod* proxy_constructor = proxy_direct_methods->Get(2);
+ // Ensure constructor is in dex cache so that we can use the dex cache to look up the overridden
+ // constructor method.
+ proxy_class->GetDexCache()->SetResolvedMethod(proxy_constructor->GetDexMethodIndex(),
+ proxy_constructor);
// Clone the existing constructor of Proxy (our constructor would just invoke it so steal its
// code_ too)
mirror::ArtMethod* constructor = down_cast<mirror::ArtMethod*>(proxy_constructor->Clone(self));