Bug 711970 - Open localStorage DBs with the faster openUnsharedDatabase. r=mayhemer

This commit is contained in:
Vladan Djeric 2012-01-10 14:10:16 -05:00
Родитель a3fb6ff53f
Коммит 5bef08fa36
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -198,12 +198,12 @@ nsDOMStoragePersistentDB::Init(const nsString& aDatabaseName)
service = do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = service->OpenDatabase(storageFile, getter_AddRefs(mConnection));
rv = service->OpenUnsharedDatabase(storageFile, getter_AddRefs(mConnection));
if (rv == NS_ERROR_FILE_CORRUPTED) {
// delete the db and try opening again
rv = storageFile->Remove(false);
NS_ENSURE_SUCCESS(rv, rv);
rv = service->OpenDatabase(storageFile, getter_AddRefs(mConnection));
rv = service->OpenUnsharedDatabase(storageFile, getter_AddRefs(mConnection));
}
NS_ENSURE_SUCCESS(rv, rv);