diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-05-20 13:46:00 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-05-20 18:05:32 -0700 |
commit | bd0fb61e24270b1f382ecbef4c1260c703550e84 (patch) | |
tree | 8ea1370cf907771d24ec4776162d92ee407ee05d /runtime/mirror/art_field.h | |
parent | 07d5fa63f562702d722d9a212fdef8ffc542c5eb (diff) | |
download | art-bd0fb61e24270b1f382ecbef4c1260c703550e84.zip art-bd0fb61e24270b1f382ecbef4c1260c703550e84.tar.gz art-bd0fb61e24270b1f382ecbef4c1260c703550e84.tar.bz2 |
Simplify Class::IsArtFieldClass().
Fix the slight glitch that when ImageSpace::VerifyImageAllocations()
called in ImageSpace::Create(), the ArtField and ArtMethod class roots
weren't set, which were used by DCHECKs in Object::Size(), which
VerifyImageAllocations() calls, by delaying the point of the
VerifyImageAllocations() call to Runtime::Init() at which point the
class linker has set the class roots.
To completely disable read barriers from Object::SizeOf(), the
ReadBarrierOption template parameter should have been added to
Class::GetInstanceField(), which calls GetFieldObject(), when it's
called from Class::IsArtFieldClass(). This change fixes this by
removing the need for the call, instead of adding the
ReadBarrierOption parameter.
Bug: 12687968
Change-Id: Ibbecc08f4e3b898851805d690dff8ccac55e94f2
Diffstat (limited to 'runtime/mirror/art_field.h')
-rw-r--r-- | runtime/mirror/art_field.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/mirror/art_field.h b/runtime/mirror/art_field.h index 36e62c2..30cd180 100644 --- a/runtime/mirror/art_field.h +++ b/runtime/mirror/art_field.h @@ -122,7 +122,7 @@ class MANAGED ArtField : public Object { void SetObj(Object* object, Object* new_value) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); static Class* GetJavaLangReflectArtField() { - DCHECK(java_lang_reflect_ArtField_ != NULL); + DCHECK(java_lang_reflect_ArtField_ != nullptr); return java_lang_reflect_ArtField_; } |