diff options
-rw-r--r-- | libart/src/main/java/dalvik/system/ClassExt.java | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/libart/src/main/java/dalvik/system/ClassExt.java b/libart/src/main/java/dalvik/system/ClassExt.java index 2c7dc6b400..e52303536d 100644 --- a/libart/src/main/java/dalvik/system/ClassExt.java +++ b/libart/src/main/java/dalvik/system/ClassExt.java @@ -40,6 +40,15 @@ public final class ClassExt { private Object jmethodIDs; /** + * If the class has undergone structural redefinition, the now obsolete class object. + * + * Needed to ensure that the class isn't unloaded before its jit code is. Normally this is + * handled by the classloader but since the class is now obsolete it's no longer held live + * there and instead we must do so manually. This class should not be used for anything. + */ + private Class<?> obsoleteClass; + + /** * An array of all obsolete DexCache objects that are needed for obsolete methods. * * These entries are associated with the obsolete ArtMethod pointers at the same indexes in the @@ -90,16 +99,6 @@ public final class ClassExt { private Object verifyError; /** - * ClassDef index of the related class in the pre-redefine dex file. Set together with - * {@code preRedefineDexFilePtr}. - * - * Needed in order to preserve access to dex-level hiddenapi flags after JVMTI redefine. - * - * This field is a logical part of the 'Class' type. - */ - private int preRedefineClassDefIndex; - - /** * If set, native pointer to the initial, pre-redefine, dex file associated with the related * class. This is different from the {@code originalDexFile} which is the pre-retransform dex * file, i.e. could contain the bytes of the dex file provided during redefine. @@ -115,6 +114,17 @@ public final class ClassExt { private long preRedefineDexFilePtr; /** + * ClassDef index of the related class in the pre-redefine dex file. Set together with + * {@code preRedefineDexFilePtr}. + * + * Needed in order to preserve access to dex-level hiddenapi flags after JVMTI redefine. + * + * This field is a logical part of the 'Class' type. + */ + private int preRedefineClassDefIndex; + + + /** * Private constructor. * * Only created by the runtime. |