In JDK-8329570: 'G1: Excessive is_obj_dead_cond calls in verification' we moved the verification of the containing object so that it was done only once. We left the repeated null-check because of concerns that moving it would open up the risk that someone in the future would miss calling set_containing_obj or calling it with a null object.
I propose that we restructure the code to make the closure's state const and remove the set_containing_obj function.
I propose that we restructure the code to make the closure's state const and remove the set_containing_obj function.