commit | 5d5c9a3aa4215bdd9090bea753bce961e60e70de | [log] [tgz] |
---|---|---|
author | Troy Hildebrandt <thildebr@chromium.org> | Wed Dec 12 22:11:12 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Dec 12 22:11:12 2018 |
tree | 0555fd45dec5e378534df219bf21d57a653a4ef7 | |
parent | ad0bd35f93a41cc30cd7741ea842cf84c7e39821 [diff] |
Fix SharedProtoDatabase WeakPtr dereferences/multiple init issues. Introduces the concept of pending client initializations so that we don't fail in odd ways if multiple initializations are in flight. Also fixes some of the initialization PostTasks to ensure we're always dereferencing our WeakPtrs on the same task runnerand ensuring that we actually post our callbacks on the calling task runner. Removes the WeakPtrFactory from ProtoLevelDBWrapper as well, which involves a substantial refactoring to get DB init status back. A new InitStatusCallback has been created so the 2 param Init and InitWithDatabase calls give me an InitStatus. IsCorrupt was removed, since setting the corruption state was the only thing that required using a WeakPtr in the first place. This gives us the freedom to make calls to the wrapper from any sequence regardless of what it was created on, and not have the WeakPtrFactory cause problems when it's destructed. Bug: 912117,870813 Change-Id: Ic7931a543b4d3d09714184dfb335311130bc7667 Reviewed-on: https://chromium-review.googlesource.com/c/1364074 Commit-Queue: Troy Hildebrandt <thildebr@chromium.org> Reviewed-by: Tommy Nyquist <nyquist@chromium.org> Cr-Commit-Position: refs/heads/master@{#616072}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .