diff options
author | Brian Carlstrom <bdc@google.com> | 2012-03-30 01:08:38 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2012-03-30 01:08:38 -0700 |
commit | e77be401064117032b7c4bbad3f897f5c0b23a26 (patch) | |
tree | b00ba26994afbb23a6d22c615153c2a02a3a583e | |
parent | 93235f7b6ff000c80acf25cc998b853449c68c77 (diff) | |
download | art-e77be401064117032b7c4bbad3f897f5c0b23a26.zip art-e77be401064117032b7c4bbad3f897f5c0b23a26.tar.gz art-e77be401064117032b7c4bbad3f897f5c0b23a26.tar.bz2 |
More ClassHelper class validation
Change-Id: Id66d68785b4224c2149bef44c65344c0a60b6a69
-rw-r--r-- | src/object_utils.h | 8 |
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_) { |