mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 483693 - import from legacy storage should use a transaction for better performance. r=sdwilsh
This commit is contained in:
parent
1d325109b3
commit
e6ec16865a
@ -914,11 +914,15 @@ LoginManagerStorage_mozStorage.prototype = {
|
||||
|
||||
// Import logins and disabledHosts
|
||||
let logins = legacy.getAllEncryptedLogins({});
|
||||
|
||||
// Wrap in a transaction for better performance.
|
||||
this._dbConnection.beginTransaction();
|
||||
for each (let login in logins)
|
||||
this._addLogin(login, true);
|
||||
let disabledHosts = legacy.getAllDisabledHosts({});
|
||||
for each (let hostname in disabledHosts)
|
||||
this.setLoginSavingEnabled(hostname, false);
|
||||
this._dbConnection.commitTransaction();
|
||||
} catch (e) {
|
||||
this.log("_importLegacySignons failed: " + e.name + " : " + e.message);
|
||||
throw "Import failed";
|
||||
|
Loading…
Reference in New Issue
Block a user