Bug 792833 - 'Do not unset current transaction until after savepoint has been released'. r=khuey.

This commit is contained in:
Ben Turner 2012-09-20 09:26:58 -07:00
Родитель 2002848ad6
Коммит 4699115b5a
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -288,8 +288,6 @@ AsyncConnectionHelper::Run()
mResultCode = DoDatabaseWork(connection);
if (mDatabase) {
IndexedDatabaseManager::SetCurrentWindow(nullptr);
// Release or roll back the savepoint depending on the error code.
if (hasSavepoint) {
NS_ASSERTION(mTransaction, "Huh?!");
@ -300,6 +298,10 @@ AsyncConnectionHelper::Run()
mTransaction->RollbackSavepoint();
}
}
// Don't unset this until we're sure that all SQLite activity has
// completed!
IndexedDatabaseManager::SetCurrentWindow(nullptr);
}
}
else {