summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorFranklinDM <mrmineshafter17@gmail.com>2023-02-18 14:34:56 +0800
committerFranklinDM <mrmineshafter17@gmail.com>2023-02-20 17:25:09 +0800
commita434994229642aacb44b8728f7791dfa349ac753 (patch)
treeb8950ba7837adb6ad508a9091e2ab90b5fbb17bd /storage
parent97f69387f47baaa051e8f8da20cb6126d4cc51ab (diff)
downloaduxp-a434994229642aacb44b8728f7791dfa349ac753.tar.gz
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
Diffstat (limited to 'storage')
-rw-r--r--storage/mozStorageService.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
index 8c6f65232c..04be1f8733 100644
--- a/storage/mozStorageService.cpp
+++ b/storage/mozStorageService.cpp
@@ -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();
}
}