< prev index next >

src/hotspot/share/oops/objArrayKlass.inline.hpp

Print this page
*** 68,11 ***
    }
  }
  
  template <typename T, typename OopClosureType>
  void ObjArrayKlass::oop_oop_iterate(oop obj, OopClosureType* closure) {
!   assert (obj->is_array(), "obj must be array");
    objArrayOop a = objArrayOop(obj);
  
    if (Devirtualizer::do_metadata(closure)) {
      Devirtualizer::do_klass(closure, obj->klass());
    }
--- 68,12 ---
    }
  }
  
  template <typename T, typename OopClosureType>
  void ObjArrayKlass::oop_oop_iterate(oop obj, OopClosureType* closure) {
!   // In this assert, we cannot safely access the Klass* with compact headers.
+   assert (UseCompactObjectHeaders || obj->is_array(), "obj must be array");
    objArrayOop a = objArrayOop(obj);
  
    if (Devirtualizer::do_metadata(closure)) {
      Devirtualizer::do_klass(closure, obj->klass());
    }
< prev index next >