add: else { try { gPrefs.clearUserPref("mailnews.customHeaders"); } catch(ex) {} } 
context: function onOk(){   if (gArrayHdrs.length)  {    var hdrs = gArrayHdrs.join(": ");    gPrefs.setCharPref("mailnews.customHeaders", hdrs);    // flush prefs to disk, in case we crash, to avoid dataloss and problems with filters that use the custom headers    var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);    prefService.savePrefFile(null);  }  window.close();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5b7848020fa1667d7c492b16926c7359a30f2253/CustomHeaders.js/buggy/mailnews/base/search/resources/content/CustomHeaders.js