rem: var historyWindow = windowManager.GetMostRecentWindow('history:manager'); 
add: var historyWindow = windowManager.getMostRecentWindow('history:manager'); 
context: function toHistory(){  // Use a single sidebar history dialog  var cwindowManager = Components.classes['component://netscape/rdf/datasource?name=window-mediator'].getService();  var iwindowManager = Components.interfaces.nsIWindowMediator;  var windowManager  = cwindowManager.QueryInterface(iwindowManager);  var historyWindow = windowManager.GetMostRecentWindow('history:manager');  if (historyWindow) {    //debug("Reuse existing history window");    historyWindow.focus();  } else {    //debug("Open a new history dialog");    if (true == gDisableHistory) {      //debug("Recently opened one. Wait a little bit.");      return;    }    gDisableHistory = true;    window.open( "chrome://history/content/", "_blank", "chrome,menubar,resizable,scrollbars" );    setTimeout(enableHistory, 2000);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2c1300301d84fefd6b06818cc7835fb40b42ffb0/tasksOverlay.js/buggy/xpfe/global/resources/content/tasksOverlay.js