• grt@chromium.org's avatar
    Fix NULL deref in HistoryBackend::ExpireHistoryBetween. · 6c60cde7
    grt@chromium.org authored
    We're seeing crashes in history::VisitDatabase::GetStartDate coming from
    HistoryBackend::ExpireHistoryBetween where db_ is NULL. This change
    mitigates this by two avenues: first_recorded_time_ is cleared when the
    DB is closed (so that no other code that checks it blows up), and
    GetStartDate is no longer called by ExpireHistoryBetween when db_ is
    NULL.
    
    Evidence suggests that this bug is responsible for browser crashes at
    shutdown that result in a corrupt profile dialog on the next launch.
    
    BUG=275916, 273832, 165282, 107613, 36588
    R=brettw@chromium.org
    
    Review URL: https://chromiumcodereview.appspot.com/23861005
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221802 0039d316-1c4b-4281-b951-d872f2087c98
    6c60cde7
history_backend.cc 100 KB