Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Issue 2265103002: LoginDatabase::Init: rollback before closing a DB (Closed)

Created:
4 years, 3 months ago by vabr (Chromium)
Modified:
4 years, 3 months ago
Reviewers:
vasilii
CC:
chromium-reviews, gcasto+watchlist_chromium.org, vabr+watchlistpasswordmanager_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

LoginDatabase::Init: rollback before closing a DB Currently, LoginDatabase::Init closes its sql::Connection on error. It also uses an sql::Transaction to roll back changes made so far. Unfortunately, it does so in the wrong order. This CL fixes that and adds a test for it. BUG=639803 Committed: https://crrev.com/7bdd9928d167b3de18f68219a3ea0b817cb99ad3 Cr-Commit-Position: refs/heads/master@{#413460}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Review #

Patch Set 3 : CreateUniqueTempDir #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -0 lines) Patch
M components/password_manager/core/browser/login_database.cc View 1 5 chunks +5 lines, -0 lines 0 comments Download
M components/password_manager/core/browser/login_database_unittest.cc View 1 2 1 chunk +24 lines, -0 lines 1 comment Download

Messages

Total messages: 21 (11 generated)
vabr (Chromium)
Hi Vasilii, PTAL. I can confirm that the test crashed without the fix and passed ...
4 years, 3 months ago (2016-08-22 14:23:14 UTC) #3
vasilii
https://codereview.chromium.org/2265103002/diff/1/components/password_manager/core/browser/login_database.cc File components/password_manager/core/browser/login_database.cc (right): https://codereview.chromium.org/2265103002/diff/1/components/password_manager/core/browser/login_database.cc#newcode534 components/password_manager/core/browser/login_database.cc:534: transaction.Rollback(); If it didn't begin there is nothing to ...
4 years, 3 months ago (2016-08-22 14:31:55 UTC) #5
vabr (Chromium)
Thanks Vasilii, for catching so many of my mistakes. I guess I was a bit ...
4 years, 3 months ago (2016-08-22 14:39:48 UTC) #7
vasilii
lgtm
4 years, 3 months ago (2016-08-22 14:44:47 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2265103002/20001
4 years, 3 months ago (2016-08-22 14:49:40 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/56060)
4 years, 3 months ago (2016-08-22 15:03:15 UTC) #14
vabr (Chromium)
One more mistake, but a straightforward one to fix. I'm going to continue landing, please ...
4 years, 3 months ago (2016-08-22 15:38:05 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2265103002/40001
4 years, 3 months ago (2016-08-22 15:38:46 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-08-22 17:14:33 UTC) #19
commit-bot: I haz the power
4 years, 3 months ago (2016-08-22 17:16:11 UTC) #21
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/7bdd9928d167b3de18f68219a3ea0b817cb99ad3
Cr-Commit-Position: refs/heads/master@{#413460}

Powered by Google App Engine
This is Rietveld 408576698