rem: if (this.readOnly) { throw new Components.Exception( "Calendar is read-only.", Components.interfaces.calIErrors.CAL_IS_READONLY ); } 
add: this.assureReadWrite(); 
context: calWcapCalendar.prototype.deleteItem = function( item, listener ){    this.log( "deleteItem() call: " + item.id );    try {        if (this.readOnly) {            throw new Components.Exception(                "Calendar is read-only.",                Components.interfaces.calIErrors.CAL_IS_READONLY );        }        if (item.id == null)            throw new Components.Exception("no item id!");                var url = this.session.getCommandUrl(            isEvent(item) ? "deleteevents_by_id" : "deletetodos_by_id" );        url += ("&calid=" + encodeURIComponent(this.calId));        url += ("&uid=" + item.id);                if (isParent(item)) // delete THIS AND ALL:            url += "&mod=4&rid=0";        else // delete THIS INSTANCE:            url += ("&mod=1&rid=" + getIcalUTC(item.recurrenceId));                var this_ = this;        this.session.issueAsyncRequest(            url + "&fmt-out=text%2Fxml", stringToXml,            function( wcapResponse ) {                this_.deleteItem_resp( wcapResponse, item, listener );            } );    }    catch (exc) {        if (listener != null) {            listener.onOperationComplete(                this.superCalendar, Components.results.NS_ERROR_FAILURE,                Components.interfaces.calIOperationListener.DELETE,                item.id, exc );        }        this.notifyError( exc );    }    this.log( "deleteItem() returning." );};
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/50dafc0b163e0df2f1405b136de455ba89d9f671/calWcapCalendarItems.js/buggy/calendar/providers/wcap/calWcapCalendarItems.js