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

This commit is contained in:
Ben Turner 2015-04-21 13:46:00 -04:00
parent d92bba153d
commit 9db6519240

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 =