Bug 653335 - Sync setup wizard triggers Change Master Password dialog. r=philikon, approval-mozilla-aurora=LegNeato
authorRichard Newman <rnewman@mozilla.com>
Mon, 31 Oct 2011 13:57:42 -0700
changeset 79146 9748abf802919fde7924f1368adae2282b7d13e0
parent 79145 532d27c289ded70b9bec2663730ea14f04354c24
child 79147 95d475c2449dd7afc8922dc80a8e6f2485988df0
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilikon
bugs653335
milestone9.0a2
Bug 653335 - Sync setup wizard triggers Change Master Password dialog. r=philikon, approval-mozilla-aurora=LegNeato
services/sync/modules/util.js
--- a/services/sync/modules/util.js
+++ b/services/sync/modules/util.js
@@ -1087,16 +1087,19 @@ let Utils = {
     
     // something wacky happened, pretend MP is locked
     return true;
   },
 
   // If Master Password is enabled and locked, present a dialog to unlock it.
   // Return whether the system is unlocked.
   ensureMPUnlocked: function ensureMPUnlocked() {
+    if (!Utils.mpLocked()) {
+      return true;
+    }
     let sdr = Cc["@mozilla.org/security/sdr;1"]
                 .getService(Ci.nsISecretDecoderRing);
     try {
       sdr.encryptString("bacon");
       return true;
     } catch(e) {}
     return false;
   },