When the heap sampler was added, a lot of various paths could lead to where the allocation could happen and it was not trivial to see if a collector was present.
Since then, a refactor took place and the code actually has merged all paths to a single memAllocator path that then does the collection and allocation in the same spot.
Therefore, the assertion code is no longer needed.
Furthermore, it is a nop right now, it basically says:
Say there is a collector
Check if there is a collector
Say there is no longer a collector
And there is no path that would not make both statements not true.
Since then, a refactor took place and the code actually has merged all paths to a single memAllocator path that then does the collection and allocation in the same spot.
Therefore, the assertion code is no longer needed.
Furthermore, it is a nop right now, it basically says:
Say there is a collector
Check if there is a collector
Say there is no longer a collector
And there is no path that would not make both statements not true.