rem: prefs = prefs.QueryInterface(Components.interfaces.nsIPref); 
add: prefs = prefs.QueryInterface(Components.interfaces.nsIPrefBranch); 
context: function InitEditCard(){  gAddressBookBundle = document.getElementById("bundle_addressBook");  // create editCard object that contains global variables for editCard.js  editCard = new Object;  // get pointer to nsIPref object  var prefs = Components.classes["@mozilla.org/preferences;1"];  if ( prefs )  {    prefs = prefs.getService();    if ( prefs )    {      prefs = prefs.QueryInterface(Components.interfaces.nsIPref);      editCard.prefs = prefs;    }  }  // get specific prefs that editCard will need  if ( prefs )  {    try {      editCard.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.displayName.lastnamefirst");      editCard.generateDisplayName = prefs.GetBoolPref("mail.addr_book.displayName.autoGeneration");      editCard.lastFirstSeparator = ", ";      editCard.firstLastSeparator = " ";    }    catch (ex) {      dump("failed to get pref\n");    }  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/faf03ce445712b372523f881cc3144cfadc7a611/abCardOverlay.js/buggy/mailnews/addrbook/resources/content/abCardOverlay.js