summaryrefslogtreecommitdiff
path: root/runtime/native/java_lang_DexCache.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-11-28 07:38:35 -0800
committer Andreas Gampe <agampe@google.com> 2016-11-29 11:11:46 -0800
commit8a0128a5ca0784f6d2b4ca27907e8967a74bc4c5 (patch)
tree0dec75200282ae5e49785395e97bd4e6459f1c09 /runtime/native/java_lang_DexCache.cc
parent60438b46090d22bb9b978196f5aa53fab3b89759 (diff)
ART: Add dex::StringIndex
Add abstraction for uint32_t string index. Test: m test-art-host Change-Id: I917c2881702fe3df112c713f06980f2278ced7ed
Diffstat (limited to 'runtime/native/java_lang_DexCache.cc')
-rw-r--r--runtime/native/java_lang_DexCache.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/native/java_lang_DexCache.cc b/runtime/native/java_lang_DexCache.cc
index f6de593017..f1c350f23c 100644
--- a/runtime/native/java_lang_DexCache.cc
+++ b/runtime/native/java_lang_DexCache.cc
@@ -61,7 +61,8 @@ static jobject DexCache_getResolvedString(JNIEnv* env, jobject javaDexCache, jin
ScopedFastNativeObjectAccess soa(env);
ObjPtr<mirror::DexCache> dex_cache = soa.Decode<mirror::DexCache>(javaDexCache);
CHECK_LT(static_cast<size_t>(string_index), dex_cache->GetDexFile()->NumStringIds());
- return soa.AddLocalReference<jobject>(dex_cache->GetResolvedString(string_index));
+ return soa.AddLocalReference<jobject>(
+ dex_cache->GetResolvedString(dex::StringIndex(string_index)));
}
static void DexCache_setResolvedType(JNIEnv* env, jobject javaDexCache, jint type_index,
@@ -77,7 +78,7 @@ static void DexCache_setResolvedString(JNIEnv* env, jobject javaDexCache, jint s
ScopedFastNativeObjectAccess soa(env);
ObjPtr<mirror::DexCache> dex_cache = soa.Decode<mirror::DexCache>(javaDexCache);
CHECK_LT(static_cast<size_t>(string_index), dex_cache->GetDexFile()->NumStringIds());
- dex_cache->SetResolvedString(string_index, soa.Decode<mirror::String>(string));
+ dex_cache->SetResolvedString(dex::StringIndex(string_index), soa.Decode<mirror::String>(string));
}
static JNINativeMethod gMethods[] = {