Bug 1348273 - Convert the storage-related annotations; r?mak draft
authorGabriele Svelto <gsvelto@mozilla.com>
Sat, 17 Mar 2018 22:20:21 +0100
changeset 776648 8072caeba5a3525b08e6aa8521b0bde88e3fa22a
parent 776647 ffddfbba9badbbf3f50daae30cd6850684326688
child 776649 c49aeb600a4fdabf58d84eec24deeea478c926f5
push id104933
push usergsvelto@mozilla.com
push dateTue, 03 Apr 2018 14:35:30 +0000
reviewersmak
bugs1348273
milestone61.0a1
Bug 1348273 - Convert the storage-related annotations; r?mak MozReview-Commit-ID: HGS0M8JijyT
storage/mozStorageService.cpp
toolkit/crashreporter/CrashAnnotations.yaml
--- a/storage/mozStorageService.cpp
+++ b/storage/mozStorageService.cpp
@@ -791,17 +791,17 @@ Service::Observe(nsISupports *, const ch
     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()) {
           // getFilename is only the leaf name for the database file,
           // so it shouldn't contain privacy-sensitive information.
           CrashReporter::AnnotateCrashReport(
-            NS_LITERAL_CSTRING("StorageConnectionNotClosed"),
+            CrashReporter::Annotation::StorageConnectionNotClosed,
             connections[i]->getFilename());
 #ifdef DEBUG
           printf_stderr("Storage connection not closed: %s",
                         connections[i]->getFilename().get());
 #endif
           MOZ_CRASH();
         }
       }
--- a/toolkit/crashreporter/CrashAnnotations.yaml
+++ b/toolkit/crashreporter/CrashAnnotations.yaml
@@ -520,16 +520,23 @@ StartupTime:
   content: false
 
 StatFailure:
   description: >
     Error returned when invoking IStream's Stat function during the creation
     of an IPC proxy stream.
   type: string
 
+StorageConnectionNotClosed:
+  description: >
+    This annotation is added when a mozStorage connection has not been properly
+    closed during shutdown. The annotation holds the filename of the database
+    associated with the connection.
+  type: string
+
 SystemMemoryUsePercentage:
   description: >
     Windows-only, percentage of physical memory in use. This annotation is
     populated with the contents of the MEMORYSTATUSEX's structure dwMemoryLoad
     field.
   type: integer
   ping: true