rem: return wm ? wm.getMostRecentWindow("navigator:browser") : openNewNavigator(); 
add: var mostRecentNavigator = wm.getMostRecentWindow("navigator:browser"); return mostRecentNavigator ? mostRecentNavigator : aOpenFlag ? openNewNavigator() : null; 
context: function getNavigatorWindow(){  const WM_PROGID = "component://netscape/rdf/datasource?name=window-mediator";  var wm;  if (top.document) {    var possibleNavigator = top.document.getElementById("main-window");    if (possibleNavigator &&         possibleNavigator.getAttribute("windowtype") == "navigator:browser")      return top;    else {      wm = nsJSComponentManager.getService(WM_PROGID, "nsIWindowMediator");      return wm ? wm.getMostRecentWindow("navigator:browser") : openNewNavigator();    }  }  else {    wm = nsJSComponentManager.getService(WM_PROGID, "nsIWindowMediator");    return wm ? wm.getMostRecentWindow("navigator:browser") : openNewNavigator();  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ec63bd921bfae2b5ca79b2176595155886096ea8/search-panel.js/buggy/suite/common/search/search-panel.js