add:    if (gDefaultSearchViewTerms) { var isupports = null; var searchTerm; var termsArray = gDefaultSearchViewTerms.QueryInterface(Components.interfaces.nsISupportsArray); for (var i = 0; i < termsArray.Count(); i++) { isupports = termsArray.GetElementAt(i); searchTerm = isupports.QueryInterface(Components.interfaces.nsIMsgSearchTerm); searchTermsArray.AppendElement(searchTerm); } } 
context: function createSearchTerms(){  var nsMsgSearchScope = Components.interfaces.nsMsgSearchScope;  var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;  var nsMsgSearchOp = Components.interfaces.nsMsgSearchOp;  // create an i supports array to store our search terms   var searchTermsArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);  var selectedFolder = GetThreadPaneFolder();  var term = gSearchSession.createTerm();  var value = term.value;  value.str = gSearchInput.value;  term.value = value;  term.attrib = nsMsgSearchAttrib.Subject;  term.op = nsMsgSearchOp.Contains;  term.booleanAnd = false;  searchTermsArray.AppendElement(term);  // fill in the 2nd term  term = gSearchSession.createTerm();  if (IsSpecialFolder(selectedFolder, MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE))    term.attrib = nsMsgSearchAttrib.ToOrCC;  else    term.attrib = nsMsgSearchAttrib.Sender;  value = term.value;  value.str = gSearchInput.value;  term.value = value;  term.op = nsMsgSearchOp.Contains;   term.booleanAnd = false;  searchTermsArray.AppendElement(term);    createSearchTermsWithList(searchTermsArray);    // now that we've added the terms, clear out our input array  searchTermsArray.Clear();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/385e572c5cedabfcb2f27876b6c664d9d2b9b570/searchBar.js/buggy/mailnews/base/resources/content/searchBar.js