Bug 418897: Update nsUrlClassifierDBServiceWorker::OpenDB() from changes to mozIStorageService::OpenDatabase. r=tony, r=sdwilsh, blocking-firefox3=beltzner

This commit is contained in:
dcamp@mozilla.com 2008-02-25 12:58:34 -08:00
Родитель 2ebd29a193
Коммит 7585c34a33
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -2681,7 +2681,11 @@ nsUrlClassifierDBServiceWorker::OpenDb()
nsCOMPtr<mozIStorageConnection> connection;
rv = storageService->OpenDatabase(mDBFile, getter_AddRefs(connection));
if (rv == NS_ERROR_FILE_CORRUPTED) {
NS_ENSURE_SUCCESS(rv, rv);
PRBool ready;
connection->GetConnectionReady(&ready);
if (!ready) {
// delete the db and try opening again
rv = mDBFile->Remove(PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
@ -2689,8 +2693,8 @@ nsUrlClassifierDBServiceWorker::OpenDb()
newDB = PR_TRUE;
rv = storageService->OpenDatabase(mDBFile, getter_AddRefs(connection));
NS_ENSURE_SUCCESS(rv, rv);
}
NS_ENSURE_SUCCESS(rv, rv);
if (!newDB) {
PRInt32 databaseVersion;