Backed out changeset 1a7c349c2c60 (bug 1546892) for causing Bug 1528690 on a CLOSED TREE

This commit is contained in:
Andreea Pavel 2019-05-08 20:50:48 +03:00
parent 95a481edab
commit eec25e57b2

View File

@ -9500,7 +9500,7 @@ void DatabaseConnection::FinishWriteTransaction() {
nsresult DatabaseConnection::StartSavepoint() {
AssertIsOnConnectionThread();
MOZ_ASSERT(mStorageConnection);
MOZ_DIAGNOSTIC_ASSERT(mUpdateRefcountFunction);
MOZ_ASSERT(mUpdateRefcountFunction);
MOZ_ASSERT(mInWriteTransaction);
AUTO_PROFILER_LABEL("DatabaseConnection::StartSavepoint", DOM);
@ -10062,14 +10062,12 @@ nsresult DatabaseConnection::AutoSavepoint::Start(
MOZ_ASSERT(connection);
connection->AssertIsOnConnectionThread();
#ifndef NIGHTLY_BUILD
// This is just a quick fix for preventing accessing the nullptr. The cause is
// probably because the connection was unexpectedly closed.
if (!connection->GetUpdateRefcountFunction()) {
NS_WARNING("The connection was closed for some reasons!");
return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
}
#endif
MOZ_ASSERT(!mConnection);
MOZ_ASSERT(!mDEBUGTransaction);