backout a8aeb5b375fb for causing bug 1017554
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Thu, 29 May 2014 14:08:42 -0700
changeset 185627 a195b689607a01782d16939a8285afe1d6cb9e08
parent 185626 b367d9f2ab45b823d3fb9f9415a6841e67823ab4
child 185628 7a9c57eb456437f1bc1ab4d1caaff53b162bd843
push id7052
push usermleibovic@mozilla.com
push dateThu, 29 May 2014 21:09:02 +0000
treeherderfx-team@a195b689607a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1017554
milestone32.0a1
backs outa8aeb5b375fb137bfa65a8260e7035884dbcf71a
backout a8aeb5b375fb for causing bug 1017554
mobile/android/modules/HomeProvider.jsm
--- a/mobile/android/modules/HomeProvider.jsm
+++ b/mobile/android/modules/HomeProvider.jsm
@@ -199,26 +199,26 @@ this.HomeProvider = Object.freeze({
 });
 
 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);
   });
 }
 
 /**
  * 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:
           // Recreate the items table discarding any
           // existing data.
           yield db.execute(SQL.dropItemsTable);
           yield db.execute(SQL.createItemsTable);
           break;
@@ -231,17 +231,17 @@ function upgradeDatabase(db, oldVersion,
  * Opens a database connection and makes sure that the database schema version
  * is correct, performing migrations if necessary. Consumers should be sure
  * to close any database connections they open.
  *
  * @return Promise
  * @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);
     }
 
     try {
       // Check to see if we need to perform any migrations.
       let dbVersion = parseInt(yield db.getSchemaVersion());
@@ -330,17 +330,17 @@ HomeStorage.prototype = {
    * @resolves When the operation has completed.
    */
   save: function(data, options) {
     if (data && data.length > MAX_SAVE_COUNT) {
       throw "save failed for dataset = " + this.datasetId +
         ": 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() {
           if (options && options.replace) {
             yield db.executeCached(SQL.deleteFromDataset, { dataset_id: this.datasetId });
           }
 
           // Insert data into DB.
@@ -370,17 +370,17 @@ HomeStorage.prototype = {
 
   /**
    * Deletes all rows associated with this storage.
    *
    * @return Promise
    * @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 };
         yield db.executeCached(SQL.deleteFromDataset, params);
       } finally {
         yield db.close();
       }