diff options
author | 2014-07-29 08:36:21 +0000 | |
---|---|---|
committer | 2014-07-23 19:30:00 +0000 | |
commit | 8df73882c60451e7f789bf9b1f3db2d7dc228640 (patch) | |
tree | 1be3d2c3d4bfa3a0a189d15c98c36926c812e7f1 /runtime/class_linker.cc | |
parent | 01be6e3c4e4f083842ac9a6f8f9e6c2c937b8a15 (diff) | |
parent | 167cc7c33f7100e3f7acc1594c066daa0122e27a (diff) |
Merge "Revert "Fix proxy tracing and enable tests that now work with tracing.""
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 3e8dc23c20..5599c212c1 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -3501,19 +3501,14 @@ 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); - mirror::ArtMethod* constructor = down_cast<mirror::ArtMethod*>(proxy_constructor->Clone(self)); - if (constructor == nullptr) { + // 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)); + if (constructor == NULL) { CHECK(self->IsExceptionPending()); // OOME. - return nullptr; + return NULL; } - // Make the proxy constructor's code always point to the uninstrumented code. This avoids - // getting a method enter event for the proxy constructor as the proxy constructor doesn't - // have an activation. - bool have_portable_code; - constructor->SetEntryPointFromQuickCompiledCode(GetQuickOatCodeFor(proxy_constructor)); - constructor->SetEntryPointFromPortableCompiledCode(GetPortableOatCodeFor(proxy_constructor, - &have_portable_code)); - // Make this constructor public and fix the class to be our Proxy version constructor->SetAccessFlags((constructor->GetAccessFlags() & ~kAccProtected) | kAccPublic); constructor->SetDeclaringClass(klass.Get()); |