add: var exc = wcapResponse.exception;   if (exc && (exc == Components.interfaces. calIWcapErrors.WCAP_ACCESS_DENIED_TO_CALENDAR)) { if (iListener != null) { var this_ = this; var freeBusyListener = { onGetFreeBusyTimes: function( rc, requestId, calId, count, entries ) { if (rc == Components.results.NS_OK) { var items = []; for each ( var entry in entries ) { var item = new CalEvent(); item.id = (g_busyItemUuidPrefix + entry.dtRangeStart.icalString); item.calendar = this_.superCalendar; item.title = g_busyItemTitle; item.startDate = entry.dtRangeStart; item.endDate = entry.dtRangeEnd; item.makeImmutable(); items.push(item); } iListener.onGetResult( this_.superCalendar, Components.results.NS_OK, Components.interfaces.calIItemBase, this_.log( "getItems_resp() using free-busy " + "information: success." ), items.length, items ); iListener.onOperationComplete( this_.superCalendar, Components.results.NS_OK, Components.interfaces.calIOperationListener.GET, items.length == 1 ? items[0].id : null, null ); this_.log( items.length.toString() + " items delivered." ); } else {  iListener.onOperationComplete( this_.superCalendar, Components.results.NS_ERROR_FAILURE, Components.interfaces.calIOperationListener.GET, null, rc ); } } }; this.session.getFreeBusyTimes( this.calId, rangeStart, rangeEnd, true /*bBusyOnly*/, freeBusyListener, true /*bAsync*/, 0 /*requestId*/ ); } return; }  
context: calWcapCalendar.prototype.getItems_resp = function(    wcapResponse,    itemFilter, maxResult, rangeStart, rangeEnd, iListener ){    try {        var icalRootComp = wcapResponse.data; // first statement, may throw                var items = this.parseItems(            icalRootComp, itemFilter, maxResult, rangeStart, rangeEnd );                if (iListener != null) {            iListener.onGetResult( this.superCalendar, Components.results.NS_OK,                                   Components.interfaces.calIItemBase,                                   this.log( "getItems_resp(): success." ),                                   items.length, items );            iListener.onOperationComplete(                this.superCalendar, Components.results.NS_OK,                Components.interfaces.calIOperationListener.GET,                items.length == 1 ? items[0].id : null, null );        }        this.log( items.length.toString() + " items delivered." );    }    catch (exc) {        if (iListener != null) {            iListener.onOperationComplete(                this.superCalendar, Components.results.NS_ERROR_FAILURE,                Components.interfaces.calIOperationListener.GET,                null, exc );        }        this.notifyError( exc );    }};
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/000dbb3912afd1c84fa9078804c6f61a85add764/calWcapCalendarItems.js/buggy/calendar/providers/wcap/calWcapCalendarItems.js