Bug 1348273 - Convert the storage-related annotations; r?mak draft
authorGabriele Svelto <gsvelto@mozilla.com>
Sat, 17 Mar 2018 22:20:21 +0100
changeset 781405 ec23ba7d43633ea9fca4af4c73e596c044ebdf1a
parent 781404 84d17dbe80165ba89c686be4d02a2d6a1ab82ca2
child 781406 ce25480d8082a2c92664b26cc1c7f29fa39e30f8
push id106292
push usergsvelto@mozilla.com
push dateThu, 12 Apr 2018 22:06:23 +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
@@ -521,16 +521,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