Bug 728653 - Crash in mozilla::storage::Connection::stepStatement. r=mak.

This commit is contained in:
Rafael Ávila de Espíndola 2012-02-22 09:00:28 -05:00
parent 3554776016
commit 52771dd69e
2 changed files with 10 additions and 2 deletions

View File

@ -215,7 +215,14 @@ AsyncExecuteStatements::execute(StatementDataArray &aStatements,
// Dispatch it to the background
nsIEventTarget *target = aConnection->getAsyncExecutionTarget();
NS_ENSURE_TRUE(target, NS_ERROR_NOT_AVAILABLE);
// If we don't have a valid target, this is a bug somewhere else. In the past,
// this assert found cases where a Run method would schedule a new statement
// without checking if asyncClose had been called. The caller must prevent
// that from happening or, if the work is not critical, just avoid creating
// the new statement during shutdown. See bug 718449 for an example.
MOZ_ASSERT(target);
nsresult rv = target->Dispatch(event, NS_DISPATCH_NORMAL);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -1768,7 +1768,8 @@ Database::Shutdown()
nsRefPtr<BlockingConnectionCloseCallback> closeListener =
new BlockingConnectionCloseCallback();
(void)mMainConn->AsyncClose(closeListener);
closeListener->Spin();
// The spinning is temporarily disabled. See bug 728653.
//closeListener->Spin();
// Don't set this earlier, otherwise some internal helper used on shutdown
// may bail out.