summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/class_linker.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 9248ee4011..f07282040c 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2661,7 +2661,6 @@ mirror::Class* ClassLinker::CreateProxyClass(mirror::String* name,
klass->SetName(name);
mirror::Class* proxy_class = GetClassRoot(kJavaLangReflectProxy);
klass->SetDexCache(proxy_class->GetDexCache());
-
klass->SetStatus(mirror::Class::kStatusIdx, self);
// Instance fields are inherited, but we add a couple of static fields...
@@ -2772,6 +2771,9 @@ mirror::Class* ClassLinker::CreateProxyClass(mirror::String* name,
CHECK_EQ(synth_proxy_class->GetInterfaces(), interfaces);
CHECK_EQ(synth_proxy_class->GetThrows(), throws);
}
+ std::string descriptor(GetDescriptorForProxy(klass.get()));
+ mirror::Class* existing = InsertClass(descriptor.c_str(), klass.get(), Hash(descriptor.c_str()));
+ CHECK(existing == nullptr);
return klass.get();
}