src/share/vm/prims/jni.cpp

changeset 548
ba764ed4b6f2
parent 435
a61af66fc99e
child 631
d1605aabd0a1
child 662
8d852b81e775
     1.1 --- a/src/share/vm/prims/jni.cpp	Fri Apr 11 09:56:35 2008 -0400
     1.2 +++ b/src/share/vm/prims/jni.cpp	Sun Apr 13 17:43:42 2008 -0400
     1.3 @@ -135,7 +135,10 @@
     1.4    if (offset <= small_offset_mask) {
     1.5      klassOop field_klass = k;
     1.6      klassOop super_klass = Klass::cast(field_klass)->super();
     1.7 -    while (instanceKlass::cast(super_klass)->contains_field_offset(offset)) {
     1.8 +    // With compressed oops the most super class with nonstatic fields would
     1.9 +    // be the owner of fields embedded in the header.
    1.10 +    while (instanceKlass::cast(super_klass)->has_nonstatic_fields() &&
    1.11 +           instanceKlass::cast(super_klass)->contains_field_offset(offset)) {
    1.12        field_klass = super_klass;   // super contains the field also
    1.13        super_klass = Klass::cast(field_klass)->super();
    1.14      }

mercurial