mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 744294 - Add c++ ConnectionReady. r=mak.
--HG-- extra : rebase_source : 3b074030355417564923f69bf48f219f75c3ef6b
This commit is contained in:
parent
0298f29209
commit
6760ecf50e
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user