Issue #1382 - Annotate crash with database name when storage connection not closed

Reported on https://bugzilla.mozilla.org/show_bug.cgi?id=1384036
This was fixed with an unrelated issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1372823
This commit is contained in:
FranklinDM 2023-02-18 14:34:56 +08:00 committed by roytam1
commit 6dc8a7d813

View file

@ -27,7 +27,7 @@
#include "sqlite3.h"
#ifdef SQLITE_OS_WIN
#ifdef XP_WIN
// "windows.h" was included and it can #define lots of things we care about...
#undef CompareString
#endif
@ -917,6 +917,12 @@ Service::Observe(nsISupports *, const char *aTopic, const char16_t *)
getConnections(connections);
for (uint32_t i = 0, n = connections.Length(); i < n; i++) {
if (!connections[i]->isClosed()) {
#ifdef DEBUG
nsCString msg;
msg.AppendPrintf("Storage connection to '%s' was not closed.",
connections[i]->getFilename().get());
NS_ERROR(msg.get());
#endif
MOZ_CRASH();
}
}