[Sync] Destroy leveldb::DB on a file thread
Previously, the LevelDB object was destroyed on the UI thread, but it in reality its destructor can do file IO. This wasn't causing problems, because the object is deleted late during teardown (after the UI thread gets a ScopedAllowBlocking). With this patch, delete the LevelDB object on a ThreadPool thread, so this fact is made more explicit and won't cause problems if we change profile teardown order. Bug: 1134321, 88586 Change-Id: I81ede6325b616eb7baecb532379034f0efeea7e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2443710Reviewed-by:Mikel Astiz <mastiz@chromium.org> Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Auto-Submit: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Cr-Commit-Position: refs/heads/master@{#814189}
Showing
Please register or sign in to comment