mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 448114 - Notify about non-finalized statements in debug builds
r=asuth
This commit is contained in:
parent
b8b3d6e66b
commit
122bf532ee
@ -114,6 +114,7 @@ EXPORTS
|
||||
sqlite3_mutex_leave
|
||||
sqlite3_mutex_try
|
||||
sqlite3_mprintf
|
||||
sqlite3_next_stmt
|
||||
sqlite3_open
|
||||
sqlite3_open_v2
|
||||
sqlite3_open16
|
||||
|
@ -240,6 +240,17 @@ mozStorageConnection::Close()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
// Notify about any non-finalized statements.
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
while (stmt = sqlite3_next_stmt(mDBConn, stmt)) {
|
||||
char *msg = PR_smprintf("SQL statement '%s' was not finalized",
|
||||
sqlite3_sql(stmt));
|
||||
NS_WARNING(msg);
|
||||
PR_smprintf_free(msg);
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
nsAutoLock mutex(mProgressHandlerMutex);
|
||||
if (mProgressHandler)
|
||||
@ -248,7 +259,7 @@ mozStorageConnection::Close()
|
||||
|
||||
int srv = sqlite3_close(mDBConn);
|
||||
if (srv != SQLITE_OK)
|
||||
NS_WARNING("sqlite3_close failed. There are probably outstanding statements!");
|
||||
NS_WARNING("sqlite3_close failed. There are probably outstanding statements that are listed above!");
|
||||
|
||||
mDBConn = NULL;
|
||||
return ConvertResultCode(srv);
|
||||
|
Loading…
Reference in New Issue
Block a user