--- a/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp Wed Oct 31 13:43:57 2018 +0100
+++ b/src/hotspot/share/gc/g1/g1ParScanThreadState.inline.hpp Wed Oct 31 13:43:57 2018 +0100
@@ -114,7 +114,7 @@
}
HeapRegion* hr = _g1h->heap_region_containing(to_obj);
- _scanner.set_scanning_in_young(hr->is_young());
+ G1ScanInYoungSetter x(&_scanner, hr->is_young());
// Process indexes [start,end). It will also process the header
// along with the first chunk (i.e., the chunk with start == 0).
// Note that at this point the length field of to_obj_array is not