Bug 765175 ReferenceError: getPref is not defined in addressingWidgetOverlay.js (Regression from Bug 713671). a=IanN SEAMONKEY_2_11b6_BUILD1 SEAMONKEY_2_11b6_RELEASE
authorPhilip Chee <philip.chee@gmail.com>
Fri, 15 Jun 2012 18:18:24 +0800
changeset 11944 1a82563a44d8c8f8bc2ae48b3f1454b6dfbedca1
parent 11943 da44fcf3ab5648927c0313e2a9f19932d249a6df
child 11945 526beadc4760cd3f1a037f35492ad4e3787ee28b
child 11949 1368b52ba5ca1ff20e4813958e59247031ed43b0
push idunknown
push userunknown
push dateunknown
reviewersIanN
bugs765175, 713671
Bug 765175 ReferenceError: getPref is not defined in addressingWidgetOverlay.js (Regression from Bug 713671). a=IanN
suite/mailnews/compose/addressingWidgetOverlay.js
--- a/suite/mailnews/compose/addressingWidgetOverlay.js
+++ b/suite/mailnews/compose/addressingWidgetOverlay.js
@@ -48,18 +48,16 @@ gDragService = gDragService.QueryInterfa
 var gMimeHeaderParser = null;
 
 /**
  * global variable inherited from MsgComposeCommands.js
  *
  var gMsgCompose;
  */
 
-var test_addresses_sequence = getPref("mail.debug.test_addresses_sequence");
-
 function awGetMaxRecipients()
 {
   return top.MAX_RECIPIENTS;
 }
 
 function awGetNumberOfCols()
 {
   if (gNumberOfCols == 0)
@@ -374,25 +372,28 @@ function awAddRecipient(recipientType, a
 
   // add the recipient to our spell check ignore list
   addRecipientsToIgnoreList(address);
 }
 
 function awTestRowSequence()
 {
   /*
-    This function is for debug and testing purpose only, normal user should not run it!
+    This function is for debug and testing purpose only, normal users should not run it!
 
     Everytime we insert or delete a row, we must be sure we didn't break the ID sequence of
     the addressing widget rows. This function will run a quick test to see if the sequence still ok
 
     You need to define the pref mail.debug.test_addresses_sequence to true in order to activate it
   */
 
-  if (! test_addresses_sequence)
+  var test_sequence;
+  if (gPrefs.getPrefType("mail.debug.test_addresses_sequence") == Components.interfaces.nsIPrefBranch.PREF_BOOL)
+    test_sequence = gPrefs.getBoolPref("mail.debug.test_addresses_sequence");
+  if (!test_sequence)
     return true;
 
   /* debug code to verify the sequence still good */
 
   var listbox = document.getElementById('addressingWidget');
   var listitems = listbox.getElementsByTagName('listitem');
   if (listitems.length >= top.MAX_RECIPIENTS )
   {