Bug 702559 - Adapting FHR to mozIStorageAsyncConnection-based Sqlite.jsm;r=gps

This commit is contained in:
David Rajchenbach-Teller 2013-06-26 05:45:50 -04:00
parent 2692c02de8
commit 7400575a1e
2 changed files with 3 additions and 3 deletions

View File

@ -1163,7 +1163,7 @@ MetricsStorageSqliteBackend.prototype = Object.freeze({
// 1. Create the schema.
yield self._connection.executeTransaction(function ensureSchema(conn) {
let schema = conn.schemaVersion;
let schema = yield conn.getSchemaVersion();
if (schema == 0) {
self._log.info("Creating database schema.");
@ -1172,7 +1172,7 @@ MetricsStorageSqliteBackend.prototype = Object.freeze({
yield self._connection.execute(SQL[k]);
}
self._connection.schemaVersion = 1;
yield self._connection.setSchemaVersion(1);
doCheckpoint = true;
} else if (schema != 1) {
throw new Error("Unknown database schema: " + schema);

View File

@ -80,7 +80,7 @@ add_task(function test_reconnect() {
add_task(function test_future_schema_errors() {
let backend = yield Metrics.Storage("future_schema_errors");
backend._connection.schemaVersion = 2;
yield backend._connection.setSchemaVersion(2);
yield backend.close();
let backend2;