Background Sync: Switch to thread-safe lifecycle checks.
BackgroundSyncContext's members background_sync_manager_ and services_ are documented to only be accessed on the IO thread. However, the BackgroundSyncContext destructor accesses them when running their destructors, even though it may be run on any thread (BackgroundSyncContext is RefCountedThreadSafe). These accesses are not threadsafe. This CL solves the thread safety issues by having the class' destructor run on the IO thread. Change-Id: Ib40c94987ee7cdfc58d513561493d4c8155b4b2d Reviewed-on: https://chromium-review.googlesource.com/1053404 Commit-Queue: Victor Costan <pwnall@chromium.org> Reviewed-by:Peter Beverloo <peter@chromium.org> Reviewed-by:
Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#557644}
Showing
Please register or sign in to comment