< prev index next >

src/hotspot/share/oops/typeArrayKlass.cpp

Print this page
@@ -226,11 +226,12 @@
  Klass* TypeArrayKlass::array_klass_or_null() {
    return array_klass_or_null(dimension() +  1);
  }
  
  size_t TypeArrayKlass::oop_size(oop obj) const {
-   assert(obj->is_typeArray(),"must be a type array");
+   // In this assert, we cannot safely access the Klass* with compact headers.
+   assert(UseCompactObjectHeaders || obj->is_typeArray(),"must be a type array");
    typeArrayOop t = typeArrayOop(obj);
    return t->object_size(this);
  }
  
  void TypeArrayKlass::initialize(TRAPS) {
< prev index next >