Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously removing the SafePointScope had a risk of producing a dead lock if the following scenario happens: 1) The main thread starts a GC and tries to stop all other threads. 2) The worker thread is waiting on a signal without entering the SafePointScope. The main thread cannot stop the worker thread forever and thus cannot make progress. Dead lock. However, (to avoid this kind of dead lock) code has been added to timeout the GC if the GCing thread fails at stopping other threads within 100 ms. So not entering SafePointScope will just cause the timeout -- it won't cause a dead lock. This fixes a hard-to-reproduce timing bug that's been a big concern of one of our partners. BUG=592124,608603 TEST=manual Review-Url: https://codereview.chromium.org/2009093002 Cr-Commit-Position: refs/heads/master@{#399265} (cherry picked from commit f466a07) Review URL: https://codereview.chromium.org/2065823003 . Cr-Commit-Position: refs/branch-heads/2743@{crosswalk-project#353} Cr-Branched-From: 2b3ae3b-refs/heads/master@{#394939}
- Loading branch information