summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2012-03-30 01:08:38 -0700
committerBrian Carlstrom <bdc@google.com>2012-03-30 01:08:38 -0700
commite77be401064117032b7c4bbad3f897f5c0b23a26 (patch)
treeb00ba26994afbb23a6d22c615153c2a02a3a583e
parent93235f7b6ff000c80acf25cc998b853449c68c77 (diff)
downloadart-e77be401064117032b7c4bbad3f897f5c0b23a26.zip
art-e77be401064117032b7c4bbad3f897f5c0b23a26.tar.gz
art-e77be401064117032b7c4bbad3f897f5c0b23a26.tar.bz2
More ClassHelper class validation
Change-Id: Id66d68785b4224c2149bef44c65344c0a60b6a69
-rw-r--r--src/object_utils.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/object_utils.h b/src/object_utils.h
index cb963cc..99768de 100644
--- a/src/object_utils.h
+++ b/src/object_utils.h
@@ -67,11 +67,15 @@ class ClassHelper {
dex_cache_(NULL),
dex_file_(NULL),
interface_type_list_(NULL),
- klass_(c) {
+ klass_(NULL) {
+ if (c != NULL) {
+ ChangeClass(c);
+ }
}
void ChangeClass(const Class* new_c) {
- CHECK(new_c != NULL) << "klass_=" << HexDump(klass_, sizeof(Class), true);
+ CHECK(new_c != NULL) << "klass_=" << klass_ << " " << HexDump(klass_, sizeof(Class), true);
+ CHECK(new_c->IsClass()) << "klass_=" << klass_ << " " << HexDump(klass_, sizeof(Class), true);
if (dex_cache_ != NULL) {
DexCache* new_c_dex_cache = new_c->GetDexCache();
if (new_c_dex_cache != dex_cache_) {