rem: var scopeToUse = gSearchInput.searchMode == kQuickSearchBody && !gSearchInput.showingSearchCriteria 
add: var scopeToUse = gSearchInput && gSearchInput.searchMode == kQuickSearchBody && !gSearchInput.showingSearchCriteria 
context: function getScopeToUse(aTermsArray, aFolderToSearch, aIsOffline){  if (aIsOffline || aFolderToSearch.server.type != 'imap')    return nsMsgSearchScope.offlineMail;  var scopeToUse = gSearchInput.searchMode == kQuickSearchBody && !gSearchInput.showingSearchCriteria                   ? nsMsgSearchScope.onlineMail : nsMsgSearchScope.offlineMail;  // it's possible one of our search terms may require us to use an online mail scope (such as imap body searches)  for (var i = 0; scopeToUse != nsMsgSearchScope.onlineMail && i < aTermsArray.Count(); i++)    if (aTermsArray.GetElementAt(i).QueryInterface(Components.interfaces.nsIMsgSearchTerm).attrib == nsMsgSearchAttrib.Body)      scopeToUse = nsMsgSearchScope.onlineMail;    return scopeToUse;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/57ebb3dc1268090222ae322f1a2fdf34fd7ca12d/searchBar.js/buggy/mail/base/content/searchBar.js