Bug 1402519 - Remove MOZ_CRASHREPORTER directives from storage; r?mak draft
authorGabriele Svelto <gsvelto@mozilla.com>
Fri, 20 Oct 2017 11:00:21 +0200
changeset 688684 fd320db922f9eddf426f17bb7c941176a48caa9f
parent 688683 a109b74734cad30c12452c282aae0d81c09516e0
child 688685 5128a58ded9c279b7d135ae9ab9818b6012e6772
push id86821
push usergsvelto@mozilla.com
push dateMon, 30 Oct 2017 14:19:43 +0000
reviewersmak
bugs1402519
milestone58.0a1
Bug 1402519 - Remove MOZ_CRASHREPORTER directives from storage; r?mak MozReview-Commit-ID: HYpSWoJaEAm
storage/mozStorageService.cpp
--- a/storage/mozStorageService.cpp
+++ b/storage/mozStorageService.cpp
@@ -7,34 +7,31 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/DebugOnly.h"
 
 #include "mozStorageService.h"
 #include "mozStorageConnection.h"
 #include "nsAutoPtr.h"
 #include "nsCollationCID.h"
 #include "nsEmbedCID.h"
+#include "nsExceptionHandler.h"
 #include "nsThreadUtils.h"
 #include "mozStoragePrivateHelpers.h"
 #include "nsIXPConnect.h"
 #include "nsIObserverService.h"
 #include "nsIPropertyBag2.h"
 #include "mozilla/Services.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/LateWriteChecks.h"
 #include "mozIStorageCompletionCallback.h"
 #include "mozIStoragePendingStatement.h"
 
 #include "sqlite3.h"
 #include "mozilla/AutoSQLiteLifetime.h"
 
-#ifdef MOZ_CRASHREPORTER
-#include "nsExceptionHandler.h"
-#endif
-
 #ifdef XP_WIN
 // "windows.h" was included and it can #define lots of things we care about...
 #undef CompareString
 #endif
 
 #include "nsIPromptService.h"
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -833,23 +830,21 @@ Service::Observe(nsISupports *, const ch
       return true;
     });
 
     if (gShutdownChecks == SCM_CRASH) {
       nsTArray<RefPtr<Connection> > connections;
       getConnections(connections);
       for (uint32_t i = 0, n = connections.Length(); i < n; i++) {
         if (!connections[i]->isClosed()) {
-#ifdef MOZ_CRASHREPORTER
           // getFilename is only the leaf name for the database file,
           // so it shouldn't contain privacy-sensitive information.
           CrashReporter::AnnotateCrashReport(
             NS_LITERAL_CSTRING("StorageConnectionNotClosed"),
             connections[i]->getFilename());
-#endif
 #ifdef DEBUG
           printf_stderr("Storage connection not closed: %s",
                         connections[i]->getFilename().get());
 #endif
           MOZ_CRASH();
         }
       }
     }