diff options
Diffstat (limited to 'runtime/mirror/field.h')
-rw-r--r-- | runtime/mirror/field.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/mirror/field.h b/runtime/mirror/field.h index 6ba8dc646d..89c86e3339 100644 --- a/runtime/mirror/field.h +++ b/runtime/mirror/field.h @@ -68,8 +68,10 @@ class MANAGED Field : public AccessibleObject { return GetField32(OFFSET_OF_OBJECT_MEMBER(Field, offset_)); } - // Slow, try to use only for PrettyField and such. - ArtField* GetArtField() REQUIRES_SHARED(Locks::mutator_lock_); + // Slow, try to use only for PrettyField and such. Set use-dex-cache to false to not utilize the + // dex-cache when finding the art-field. This is useful for cases where the dex-cache might be + // temporarally invalid. + ArtField* GetArtField(bool use_dex_cache = true) REQUIRES_SHARED(Locks::mutator_lock_); template <PointerSize kPointerSize, bool kTransactionActive = false> static ObjPtr<mirror::Field> CreateFromArtField(Thread* self, @@ -77,6 +79,12 @@ class MANAGED Field : public AccessibleObject { bool force_resolve) REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); + + // Used to modify the target of this Field object, if required for structural redefinition or some + // other purpose. + template<typename Visitor> + inline void VisitTarget(Visitor&& v) REQUIRES(Locks::mutator_lock_); + private: // Padding required for matching alignment with the Java peer. uint8_t padding_[2]; |