• Alexey Baskakov's avatar
    WebApp: Fix heap-use-after-free in WebAppDatabase. · 44cb30b6
    Alexey Baskakov authored
    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: default avatarMarc Treib <treib@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#748500}
    44cb30b6
web_app_migration_manager.h 3.58 KB