зеркало из https://github.com/mozilla/pjs.git
Bug 711970 - Open localStorage DBs with the faster openUnsharedDatabase. r=mayhemer
This commit is contained in:
Родитель
a3fb6ff53f
Коммит
5bef08fa36
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче