Bug 744294 - Add c++ ConnectionReady. r=mak.

--HG--
extra : rebase_source : 3b074030355417564923f69bf48f219f75c3ef6b
This commit is contained in:
Rafael Ávila de Espíndola 2012-05-09 10:32:14 -04:00
parent 0298f29209
commit 6760ecf50e
2 changed files with 6 additions and 4 deletions

View File

@ -816,10 +816,8 @@ Connection::setClosedState()
bool
Connection::isAsyncClosing() {
MutexAutoLock lockedScope(sharedAsyncExecutionMutex);
bool isReady;
(void)GetConnectionReady(&isReady);
return mAsyncExecutionThreadShuttingDown && !!mAsyncExecutionThread &&
isReady;
ConnectionReady();
}
nsresult
@ -1135,7 +1133,7 @@ Connection::Clone(bool aReadOnly,
NS_IMETHODIMP
Connection::GetConnectionReady(bool *_ready)
{
*_ready = (mDBConn != nsnull);
*_ready = ConnectionReady();
return NS_OK;
}

View File

@ -175,6 +175,10 @@ public:
*/
int stepStatement(sqlite3_stmt* aStatement);
bool ConnectionReady() {
return mDBConn != nsnull;
}
/**
* True if this is an async connection, it is shutting down and it is not
* closed yet.