calWcapCalendar.prototype.adoptItem_resp = function( wcapResponse, newItem_, listener ) { var item = null; try { var icalRootComp = wcapResponse.data;  var items = this.parseItems( icalRootComp, Components.interfaces.calICalendar.ITEM_FILTER_ALL_ITEMS, 0, null, null, true /* bLeaveMutable */ ); if (items.length < 1) throw new Components.Exception("empty VCALENDAR returned!"); if (items.length > 1) this.notifyError( "unexpected number of items: " + items.length ); item = items[0]; this.tunnelXProps(item, newItem_); item.makeImmutable();  this.log( "item.id=" + item.id ); if (listener != null) { listener.onOperationComplete( this.superCalendar, Components.results.NS_OK, Components.interfaces.calIOperationListener.ADD, item.id, item ); } this.notifyObservers( "onAddItem", [item] );  } catch (exc) { if (listener != null) { listener.onOperationComplete( this.superCalendar, Components.results.NS_ERROR_FAILURE, Components.interfaces.calIOperationListener.ADD, item == null ? null : item.id, exc ); } this.notifyError( exc ); } }; 
function adoptItem_resp(request, err, newItem) { if (listener) { listener.onOperationComplete( this_.superCalendar, getResultCode(err), calIOperationListener.ADD, err ? item.id : newItem.id, err ? err : newItem); } if (err) this_.notifyError(err); else this_.notifyObservers("onAddItem", [newItem]); }, 
calWcapCalendar.prototype.adoptItem_resp = function(    wcapResponse, newItem_, listener ){    var item = null;    try {        var icalRootComp = wcapResponse.data; // first statement, may throw                var items = this.parseItems(            icalRootComp,            Components.interfaces.calICalendar.ITEM_FILTER_ALL_ITEMS,            0, null, null, true /* bLeaveMutable */ );        if (items.length < 1)            throw new Components.Exception("empty VCALENDAR returned!");        if (items.length > 1)            this.notifyError( "unexpected number of items: " + items.length );        item = items[0];        this.tunnelXProps(item, newItem_);        item.makeImmutable();                this.log( "item.id=" + item.id );                if (listener != null) {            listener.onOperationComplete(                this.superCalendar, Components.results.NS_OK,                Components.interfaces.calIOperationListener.ADD,                item.id, item );        }        this.notifyObservers( "onAddItem", [item] );        // xxx todo: maybe log request status    }    catch (exc) {        if (listener != null) {            listener.onOperationComplete(                this.superCalendar, Components.results.NS_ERROR_FAILURE,                Components.interfaces.calIOperationListener.ADD,                item == null ? null : item.id, exc );        }        this.notifyError( exc );    }};
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/a8adf4992620da379274cea3395ed3099b6769d6/calWcapCalendarItems.js/buggy/calendar/providers/wcap/calWcapCalendarItems.js