WebApp: Fix heap-use-after-free in WebAppDatabase.
WebAppMigrationManager shouldn't destruct owned database_ object immediately in callbacks from database_. This would be a violation of the caller/callee contract. We should use PostTask instead so |this| stays valid in WebAppDatabase even after callback call. This CL fixes ./out/debug/sync_integration_tests --gtest_filter=All/SingleClientBookmarksSyncTest.PersistProgressMarkerOnRestart/0 test if BMO mode is on by default. TBR=alancutter@chromium.org Bug: 1054112 Change-Id: I170424768e7c684ed3c14e398836755201dd4f33 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089559 Commit-Queue: Alexey Baskakov <loyso@chromium.org> Reviewed-by:Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#748500}
Showing
Please register or sign in to comment