Bug 636021: 'let' and tidying in ensureMPUnlocked. r=philiKON

This commit is contained in:
Richard Newman 2011-02-22 16:09:43 -08:00
Родитель 550ffdba88
Коммит b78a4c18bb
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1487,8 +1487,8 @@ let Utils = {
},
mpLocked: function mpLocked() {
let modules = Cc["@mozilla.org/security/pkcs11moduledb;1"].
getService(Ci.nsIPKCS11ModuleDB);
let modules = Cc["@mozilla.org/security/pkcs11moduledb;1"]
.getService(Ci.nsIPKCS11ModuleDB);
let sdrSlot = modules.findSlotByName("");
let status = sdrSlot.status;
let slots = Ci.nsIPKCS11Slot;
@ -1507,13 +1507,13 @@ let Utils = {
// If Master Password is enabled and locked, present a dialog to unlock it.
// Return whether the system is unlocked.
ensureMPUnlocked: function ensureMPUnlocked() {
sdr = Cc["@mozilla.org/security/sdr;1"].getService(Ci.nsISecretDecoderRing);
var ok = false;
let sdr = Cc["@mozilla.org/security/sdr;1"]
.getService(Ci.nsISecretDecoderRing);
try {
sdr.encryptString("bacon");
ok = true;
return true;
} catch(e) {}
return ok;
return false;
},
__prefs: null,