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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database_bloom.cc

Issue 17617: Fixing crash in SafeBrowsingDatabaseBloom:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_database_bloom.cc
===================================================================
--- chrome/browser/safe_browsing/safe_browsing_database_bloom.cc (revision 7864)
+++ chrome/browser/safe_browsing/safe_browsing_database_bloom.cc (working copy)
@@ -141,6 +141,7 @@
if (!db_)
return true;
+ insert_transaction_.reset();
statement_cache_.reset(); // Must free statements before closing DB.
bool result = sqlite3_close(db_) == SQLITE_OK;
db_ = NULL;
@@ -237,8 +238,6 @@
hash_cache_->clear();
ClearUpdateCaches();
- insert_transaction_.reset();
-
bool rv = Close();
DCHECK(rv);
@@ -420,7 +419,6 @@
insert_transaction_.reset(new SQLTransaction(db_));
if (insert_transaction_->Begin() != SQLITE_OK) {
DCHECK(false) << "Safe browsing database couldn't start transaction";
- insert_transaction_.reset();
Close();
return false;
}
@@ -431,7 +429,6 @@
if (update_succeeded)
BuildBloomFilter();
- insert_transaction_.reset();
Close();
// We won't need the chunk caches until the next update (which will read them
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698