Bug 1341206 Relax Cache API schema version assertion since mismatches can happen in release profiles. r=asuth a=gchang
authorBen Kelly <ben@wanderview.com>
Wed, 22 Feb 2017 09:06:00 -0500
changeset 359369 e87493254cbe
parent 359368 ce58b07e7261
child 359370 4010c154f3c4
push id10782
push userbkelly@mozilla.com
push dateWed, 22 Feb 2017 14:06:06 +0000
treeherdermozilla-aurora@e87493254cbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth, gchang
bugs1341206
milestone53.0a2
Bug 1341206 Relax Cache API schema version assertion since mismatches can happen in release profiles. r=asuth a=gchang
dom/cache/DBSchema.cpp
--- a/dom/cache/DBSchema.cpp
+++ b/dom/cache/DBSchema.cpp
@@ -2556,17 +2556,19 @@ Migrate(mozIStorageConnection* aConn)
 #if defined(DEBUG) || !defined(RELEASE_OR_BETA)
     int32_t lastVersion = currentVersion;
 #endif
     rv = aConn->GetSchemaVersion(&currentVersion);
     if (NS_WARN_IF(NS_FAILED(rv))) { return rv; }
     MOZ_DIAGNOSTIC_ASSERT(currentVersion > lastVersion);
   }
 
-  MOZ_DIAGNOSTIC_ASSERT(currentVersion == kLatestSchemaVersion);
+  // Don't release assert this since people do sometimes share profiles
+  // across schema versions.  Our check in Validate() will catch it.
+  MOZ_ASSERT(currentVersion == kLatestSchemaVersion);
 
   if (rewriteSchema) {
     // Now overwrite the master SQL for the entries table to remove the column
     // default value.  This is also necessary for our Validate() method to
     // pass on this database.
     rv = RewriteEntriesSchema(aConn);
   }