зеркало из https://github.com/mozilla/pjs.git
Bug 418897: Update nsUrlClassifierDBServiceWorker::OpenDB() from changes to mozIStorageService::OpenDatabase. r=tony, r=sdwilsh, blocking-firefox3=beltzner
This commit is contained in:
Родитель
2ebd29a193
Коммит
7585c34a33
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче