Bug 1341206 Relax Cache API schema version assertion since mismatches can happen in release profiles. r=asuth
authorBen Kelly <ben@wanderview.com>
Tue, 21 Feb 2017 10:14:31 -0500
changeset 373107 3ebff6b4a913d8642b22adb54275dd2a6b2708fb
parent 373106 da0e8a7ad0e65882b61fc1c80f79bee40ee3a6a6
child 373108 97795c1d467d1fc260f7b345837e245f23d726c1
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1341206
milestone54.0a1
Bug 1341206 Relax Cache API schema version assertion since mismatches can happen in release profiles. r=asuth
dom/cache/DBSchema.cpp
--- a/dom/cache/DBSchema.cpp
+++ b/dom/cache/DBSchema.cpp
@@ -2559,17 +2559,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);
   }