rem: var wmdata = Components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getService(); var wmediator = wmdata.QueryInterface(Components.interfaces.nsIWindowMediator); 
add: var wmediator = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); 
context: function getAlarmDialog( Event ){   var wmdata = Components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getService();   var wmediator = wmdata.QueryInterface(Components.interfaces.nsIWindowMediator);   var calendarAlarmWindow = wmediator.getMostRecentWindow( "calendarAlarmWindow" );   //the topWindow is always null, but it loads chrome://calendar/content/calendar.xul into the open window.   if ( calendarAlarmWindow )      return calendarAlarmWindow;   else   {      return false;   }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0354e05dddf9247b92bf3dedec78ceae03724429/calendarOverlay.js/buggy/calendar/resources/content/calendarOverlay.js