Backed out changeset 562c3fe054e5 (bug 702559)
authorEd Morley <emorley@mozilla.com>
Wed, 26 Jun 2013 12:56:11 +0100
changeset 136503 0cd729c9f1a4b3ee432e5d5d82c434c89c5af43b
parent 136502 e99cc9801ae1bc39533daf38922ba355436466b2
child 136504 906f40e126fa47de4abb920478b449dcccf496c2
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs702559
milestone25.0a1
backs out562c3fe054e5f61c49e3b1bd29ee27d4f06dba4a
Backed out changeset 562c3fe054e5 (bug 702559)
services/metrics/storage.jsm
services/metrics/tests/xpcshell/test_metrics_storage.js
--- a/services/metrics/storage.jsm
+++ b/services/metrics/storage.jsm
@@ -1158,26 +1158,26 @@ MetricsStorageSqliteBackend.prototype = 
         // loss.
         yield self._connection.execute("PRAGMA synchronous=FULL");
       }
 
       let doCheckpoint = false;
 
       // 1. Create the schema.
       yield self._connection.executeTransaction(function ensureSchema(conn) {
-        let schema = yield conn.getSchemaVersion();
+        let schema = conn.schemaVersion;
 
         if (schema == 0) {
           self._log.info("Creating database schema.");
 
           for (let k of self._SCHEMA_STATEMENTS) {
             yield self._connection.execute(SQL[k]);
           }
 
-          yield self._connection.setSchemaVersion(1);
+          self._connection.schemaVersion = 1;
           doCheckpoint = true;
         } else if (schema != 1) {
           throw new Error("Unknown database schema: " + schema);
         } else {
           self._log.debug("Database schema up to date.");
         }
       });
 
--- a/services/metrics/tests/xpcshell/test_metrics_storage.js
+++ b/services/metrics/tests/xpcshell/test_metrics_storage.js
@@ -75,17 +75,17 @@ add_task(function test_reconnect() {
   yield backend.close();
 
   let backend2 = yield Metrics.Storage("reconnect");
   yield backend2.close();
 });
 
 add_task(function test_future_schema_errors() {
   let backend = yield Metrics.Storage("future_schema_errors");
-  yield backend._connection.setSchemaVersion(2);
+  backend._connection.schemaVersion = 2;
   yield backend.close();
 
   let backend2;
   let failed = false;
   try {
     backend2 = yield Metrics.Storage("future_schema_errors");
   } catch (ex) {
     failed = true;