summaryrefslogtreecommitdiff
path: root/test/497-inlining-and-class-loader
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-03-26 10:54:50 +0000
committer Vladimir Marko <vmarko@google.com> 2019-03-26 17:06:55 +0000
commitc524e9e7e767be0801cf110310039635698c1532 (patch)
treecd11699dce8c175a0940a583f5ea02ce89f73a85 /test/497-inlining-and-class-loader
parent2e1ec835d08ca0ab81b1c24436f659f952ace260 (diff)
ObjPtr<>-ify mirror::Class.
And move function definitions that rely on obj_ptr-inl.h from class.h to class-inl.h . Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: I5ccc765d0a02b1d37cb39ed68c17b8456faf92ea
Diffstat (limited to 'test/497-inlining-and-class-loader')
-rw-r--r--test/497-inlining-and-class-loader/clear_dex_cache.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/497-inlining-and-class-loader/clear_dex_cache.cc b/test/497-inlining-and-class-loader/clear_dex_cache.cc
index 730e0741b8..716d73b202 100644
--- a/test/497-inlining-and-class-loader/clear_dex_cache.cc
+++ b/test/497-inlining-and-class-loader/clear_dex_cache.cc
@@ -32,7 +32,7 @@ extern "C" JNIEXPORT jobject JNICALL Java_Main_cloneResolvedMethods(JNIEnv* env,
jclass,
jclass cls) {
ScopedObjectAccess soa(Thread::Current());
- mirror::DexCache* dex_cache = soa.Decode<mirror::Class>(cls)->GetDexCache();
+ ObjPtr<mirror::DexCache> dex_cache = soa.Decode<mirror::Class>(cls)->GetDexCache();
size_t num_methods = dex_cache->NumResolvedMethods();
mirror::MethodDexCacheType* methods = dex_cache->GetResolvedMethods();
CHECK_EQ(num_methods != 0u, methods != nullptr);
@@ -67,10 +67,9 @@ extern "C" JNIEXPORT jobject JNICALL Java_Main_cloneResolvedMethods(JNIEnv* env,
extern "C" JNIEXPORT void JNICALL Java_Main_restoreResolvedMethods(
JNIEnv*, jclass, jclass cls, jobject old_cache) {
ScopedObjectAccess soa(Thread::Current());
- mirror::DexCache* dex_cache = soa.Decode<mirror::Class>(cls)->GetDexCache();
+ ObjPtr<mirror::DexCache> dex_cache = soa.Decode<mirror::Class>(cls)->GetDexCache();
size_t num_methods = dex_cache->NumResolvedMethods();
- mirror::MethodDexCacheType* methods =
- soa.Decode<mirror::Class>(cls)->GetDexCache()->GetResolvedMethods();
+ mirror::MethodDexCacheType* methods = dex_cache->GetResolvedMethods();
CHECK_EQ(num_methods != 0u, methods != nullptr);
ObjPtr<mirror::Array> old = soa.Decode<mirror::Array>(old_cache);
CHECK_EQ(methods != nullptr, old != nullptr);