Bug 1155634 - Move ConnectionPool creation closer to where we actually use it and at a point guaranteed to be after QuotaManager has been started. r=khuey relanding CLOSED TREE

This commit is contained in:
Ben Turner 2015-04-22 17:14:44 -07:00
parent 65064cf4b0
commit f604e6e16e

View File

@ -11070,10 +11070,6 @@ Factory::Create(const LoggingInfo& aLoggingInfo)
// If this is the first instance then we need to do some initialization.
if (!sFactoryInstanceCount) {
if (!gConnectionPool) {
gConnectionPool = new ConnectionPool();
}
MOZ_ASSERT(!gLiveDatabaseHashtable);
gLiveDatabaseHashtable = new DatabaseActorHashtable();
@ -11905,6 +11901,10 @@ Database::RecvPBackgroundIDBTransactionConstructor(
return true;
}
if (!gConnectionPool) {
gConnectionPool = new ConnectionPool();
}
auto* transaction = static_cast<NormalTransaction*>(aActor);
nsRefPtr<StartTransactionOp> startOp = new StartTransactionOp(transaction);
@ -17775,6 +17775,10 @@ OpenDatabaseOp::DispatchToWorkThread()
return NS_ERROR_OUT_OF_MEMORY;
}
if (!gConnectionPool) {
gConnectionPool = new ConnectionPool();
}
nsRefPtr<VersionChangeOp> versionChangeOp = new VersionChangeOp(this);
uint64_t transactionId =