mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 702559 - Adapting FHR to mozIStorageAsyncConnection-based Sqlite.jsm;r=gps
This commit is contained in:
parent
2692c02de8
commit
7400575a1e
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user