< prev index next >

src/hotspot/share/gc/g1/g1OopClosures.inline.hpp

Print this page
@@ -233,11 +233,11 @@
    const G1HeapRegionAttr state = _g1h->region_attr(obj);
    if (state.is_in_cset()) {
      oop forwardee;
      markWord m = obj->mark();
      if (m.is_marked()) {
-       forwardee = cast_to_oop(m.decode_pointer());
+       forwardee = obj->forwardee(m);
      } else {
        forwardee = _par_scan_state->copy_to_survivor_space(state, obj, m);
      }
      assert(forwardee != NULL, "forwardee should not be NULL");
      RawAccess<IS_NOT_NULL>::oop_store(p, forwardee);
< prev index next >