summaryrefslogtreecommitdiffstats
path: root/runtime/dex_file_verifier.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-06-13 11:35:12 -0700
committerAndreas Gampe <agampe@google.com>2014-06-13 11:35:12 -0700
commit5e31ddadd29325649260aa186e9ffa8ccdb370a2 (patch)
treec8748ac5f65764845bb0c67828431e7f450de156 /runtime/dex_file_verifier.h
parentcafd0f251b32e95d0596b20c9a385433368ba3b9 (diff)
downloadandroid_art-5e31ddadd29325649260aa186e9ffa8ccdb370a2.tar.gz
android_art-5e31ddadd29325649260aa186e9ffa8ccdb370a2.tar.bz2
android_art-5e31ddadd29325649260aa186e9ffa8ccdb370a2.zip
ART: Clean up DexFile verifier API
Use an out arg instead of widening a return type. Change-Id: I70744eec408b0c6f3487f168faf510869277daff
Diffstat (limited to 'runtime/dex_file_verifier.h')
-rw-r--r--runtime/dex_file_verifier.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/dex_file_verifier.h b/runtime/dex_file_verifier.h
index 7489dcde86..f845993113 100644
--- a/runtime/dex_file_verifier.h
+++ b/runtime/dex_file_verifier.h
@@ -72,10 +72,10 @@ class DexFileVerifier {
bool CheckOffsetToTypeMap(size_t offset, uint16_t type);
- // Note: the result type of the following methods is wider than that of the underlying index
- // (16b vs 32b). This is so that we can define an error value (anything >= 2^16).
- uint32_t FindFirstClassDataDefiner(const byte* ptr);
- uint32_t FindFirstAnnotationsDirectoryDefiner(const byte* ptr);
+ // Note: as sometimes kDexNoIndex16, being 0xFFFF, is a valid return value, we need an
+ // additional out parameter to signal any errors loading an index.
+ uint16_t FindFirstClassDataDefiner(const byte* ptr, bool* success);
+ uint16_t FindFirstAnnotationsDirectoryDefiner(const byte* ptr, bool* success);
bool CheckInterStringIdItem();
bool CheckInterTypeIdItem();