Fix race condition in TransitionCollector.
There was a minor race condition that could happen if multiple
threads called TransitionCollector at the same time. Starting out
Thread 1: TransitionCollector(SS).
Thread 2: TransitionCollector(CMS) sees that it is already CMS so
has copying_transition == false. But then thread 2 changes to SS.
Thread 1 resumes but incorrectly doesn't check the
disable_moving_gc_count_ possibly resulting in errors if
disable_moving_gc_count_ != 0 due to JNI since we are going from
SS -> CMS and are goign to move objects.
1 file changed