mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
backout a8aeb5b375fb for causing bug 1017554
This commit is contained in:
parent
e75d11aa6c
commit
31daf8c5f7
@ -204,7 +204,7 @@ var gDatabaseEnsured = false;
|
||||
* Creates the database schema.
|
||||
*/
|
||||
function createDatabase(db) {
|
||||
return Task.spawn(function* () {
|
||||
return Task.spawn(function create_database_task() {
|
||||
yield db.execute(SQL.createItemsTable);
|
||||
});
|
||||
}
|
||||
@ -213,7 +213,7 @@ function createDatabase(db) {
|
||||
* Migrates the database schema to a new version.
|
||||
*/
|
||||
function upgradeDatabase(db, oldVersion, newVersion) {
|
||||
return Task.spawn(function* () {
|
||||
return Task.spawn(function upgrade_database_task() {
|
||||
for (let v = oldVersion + 1; v <= newVersion; v++) {
|
||||
switch(v) {
|
||||
case 2:
|
||||
@ -236,7 +236,7 @@ function upgradeDatabase(db, oldVersion, newVersion) {
|
||||
* @resolves Handle on an opened SQLite database.
|
||||
*/
|
||||
function getDatabaseConnection() {
|
||||
return Task.spawn(function* () {
|
||||
return Task.spawn(function get_database_connection_task() {
|
||||
let db = yield Sqlite.openConnection({ path: DB_PATH });
|
||||
if (gDatabaseEnsured) {
|
||||
throw new Task.Result(db);
|
||||
@ -335,7 +335,7 @@ HomeStorage.prototype = {
|
||||
": you cannot save more than " + MAX_SAVE_COUNT + " items at once";
|
||||
}
|
||||
|
||||
return Task.spawn(function* () {
|
||||
return Task.spawn(function save_task() {
|
||||
let db = yield getDatabaseConnection();
|
||||
try {
|
||||
yield db.executeTransaction(function save_transaction() {
|
||||
@ -375,7 +375,7 @@ HomeStorage.prototype = {
|
||||
* @resolves When the operation has completed.
|
||||
*/
|
||||
deleteAll: function() {
|
||||
return Task.spawn(function* () {
|
||||
return Task.spawn(function delete_all_task() {
|
||||
let db = yield getDatabaseConnection();
|
||||
try {
|
||||
let params = { dataset_id: this.datasetId };
|
||||
|
Loading…
Reference in New Issue
Block a user