Backed out changeset f0ef54ffcec1 (bug 1058438)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 25 Jul 2016 12:20:35 +0200
changeset 348437 1c60e002f023347feb49fd7b1c08e51b601f2675
parent 348436 cdca902ad554e20aa077d43374eebad54a363c43
child 348438 b93bc99d4c6eb8cb1c6e36d56a3ce06ae83355be
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1058438
milestone50.0a1
backs outf0ef54ffcec1ded743dd180846292017b50ac858
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset f0ef54ffcec1 (bug 1058438)
toolkit/components/passwordmgr/storage-mozStorage.js
--- a/toolkit/components/passwordmgr/storage-mozStorage.js
+++ b/toolkit/components/passwordmgr/storage-mozStorage.js
@@ -1,15 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
-const DB_VERSION = 6; // The database schema version
-const PERMISSION_SAVE_LOGINS = "login-saving";
+const DB_VERSION = 5; // The database schema version
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/Promise.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
                                   "resource://gre/modules/LoginHelper.jsm");
 
@@ -1177,54 +1176,16 @@ LoginManagerStorage_mozStorage.prototype
    */
   _dbMigrateToVersion5 : function () {
     if (!this._dbConnection.tableExists("moz_deleted_logins")) {
       this._dbConnection.createTable("moz_deleted_logins", this._dbSchema.tables.moz_deleted_logins);
     }
   },
 
   /*
-   * _dbMigrateToVersion6
-   *
-   * Version 6 migrates all the hosts from
-   * moz_disabledHosts to the permission manager.
-   */
-  _dbMigrateToVersion6 : function () {
-    let disabledHosts = [];
-    let query = "SELECT hostname FROM moz_disabledHosts";
-    let stmt;
-
-    try {
-      stmt = this._dbCreateStatement(query);
-
-      while (stmt.executeStep()) {
-        disabledHosts.push(stmt.row.hostname);
-      }
-
-      for (let host of disabledHosts) {
-        try {
-          let uri = Services.io.newURI(host, null, null);
-          Services.perms.add(uri, PERMISSION_SAVE_LOGINS, Services.perms.DENY_ACTION);
-        } catch (e) {
-          Cu.reportError(e);
-        }
-      }
-    } catch (e) {
-      this.log(`_dbMigrateToVersion6 failed: ${e.name} : ${e.message}`);
-    } finally {
-      if (stmt) {
-        stmt.reset();
-      }
-    }
-
-    query = "DELETE FROM moz_disabledHosts";
-    this._dbConnection.executeSimpleSQL(query);
-  },
-
-  /*
    * _dbAreExpectedColumnsPresent
    *
    * Sanity check to ensure that the columns this version of the code expects
    * are present in the DB we're using.
    */
   _dbAreExpectedColumnsPresent : function () {
     let query = "SELECT " +
                    "id, " +