diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2023-02-18 14:34:56 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2023-02-20 17:25:09 +0800 |
commit | a434994229642aacb44b8728f7791dfa349ac753 (patch) | |
tree | b8950ba7837adb6ad508a9091e2ab90b5fbb17bd /storage | |
parent | 97f69387f47baaa051e8f8da20cb6126d4cc51ab (diff) | |
download | uxp-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.cpp | 8 |
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(); } } |