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

Unified Diff: components/webdata/common/web_database_backend.cc

Issue 2225333003: Recreate the WebData database on a catastrophic SQL error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shess@' comments Created 4 years, 4 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 | components/webdata/common/web_database_service.h » ('j') | sql/connection.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webdata/common/web_database_backend.cc
diff --git a/components/webdata/common/web_database_backend.cc b/components/webdata/common/web_database_backend.cc
index 1408bd2b9d8613ab61a2fbae136ff58bd7375a7e..73513faa22351c51bea36abbbb75c87df2bf58ab 100644
--- a/components/webdata/common/web_database_backend.cc
+++ b/components/webdata/common/web_database_backend.cc
@@ -124,6 +124,8 @@ void WebDatabaseBackend::DatabaseErrorCallback(int error,
if (!catastrophic_error_occurred_ && sql::IsErrorCatastrophic(error)) {
catastrophic_error_occurred_ = true;
diagnostics_ = db_->GetDiagnosticInfo(error, statement);
+
+ db_->GetSQLConnection()->RazeAndClose();
}
}
« no previous file with comments | « no previous file | components/webdata/common/web_database_service.h » ('j') | sql/connection.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698