rem: var iCalLibComponent = Components.classes["@mozilla.org/ical;1"].createInstance(); 
add: try { var iCalLibComponent = Components.classes["@mozilla.org/ical;1"].createInstance(); } catch ( e ) { alert( "The ICAL Componenet is not registered properly. Please file a bug at http: return; } 
context: function CalendarEventDataSource( observer, UserPath, syncPath ){      var iCalLibComponent = Components.classes["@mozilla.org/ical;1"].createInstance();                  if( !iCalLibComponent )      {         alert( "The ICAL Componenet is not registered properly. Please quit Mozilla, remove your component.reg file and restart Mozilla." );         return;      }      this.gICalLib = iCalLibComponent.QueryInterface(Components.interfaces.oeIICal);              if( !this.gICalLib )      {         alert( "The ICAL Componenet is not registered properly. Please quit Mozilla, remove your component.reg file and restart Mozilla." );         return;      }      /*      ** FROM HERE TO "<<HERE" IS A HACK FROM JSLIB, REPLACE THIS IF YOU KNOW HOW      */      const JS_DIR_UTILS_FILE_DIR_CID             = "@mozilla.org/file/directory_service;1";            const JS_DIR_UTILS_I_PROPS                  = "nsIProperties";            const JS_DIR_UTILS_DIR                  = new Components.Constructor(                                                JS_DIR_UTILS_FILE_DIR_CID,                                                JS_DIR_UTILS_I_PROPS);            const JS_DIR_UTILS_NSIFILE                  = Components.interfaces.nsIFile;            var rv;      try { rv=(new JS_DIR_UTILS_DIR()).get("ProfD", JS_DIR_UTILS_NSIFILE).path; }            catch (e)      {       dump("ERROR! IN CALENDAR EVENT.JS");       rv=null;      }            /*      ** <<HERE      */      this.UserPath = rv;      this.gICalLib.setServer( this.UserPath+"/CalendarDataFile.ics" );            this.gICalLib.addObserver( observer );            this.prepareAlarms( ); }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2a9c8033c0be1fc4131dfd48674da7a822456ec5/calendarEvent.js/buggy/calendar/resources/content/calendarEvent.js