rem: if (this.readOnly) { throw new Components.Exception( "Calendar is read-only.", Components.interfaces.calIErrors.CAL_IS_READONLY ); } 
add: this.assureReadWrite(); 
context: calWcapCalendar.prototype.modifyItem = function( newItem, oldItem, listener ){    this.log( "modifyItem() call: " + newItem.id );        try {        if (this.readOnly) {            throw new Components.Exception(                "Calendar is read-only.",                Components.interfaces.calIErrors.CAL_IS_READONLY );        }        if (!newItem.id)            throw new Components.Exception("new item has no id!");                var this_ = this;        this.storeItem(            newItem, oldItem,            function( wcapResponse ) {                this_.modifyItem_resp( wcapResponse, oldItem, listener );            } );    }    catch (exc) {        if (listener != null) {            listener.onOperationComplete(                this.superCalendar, Components.results.NS_ERROR_FAILURE,                Components.interfaces.calIOperationListener.MODIFY,                newItem.id, exc );        }        this.notifyError( exc );    }    this.log( "modifyItem() returning." );};
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d80547ac1ab2a5a587386816c2df3371bf268f59/calWcapCalendarItems.js/buggy/calendar/providers/wcap/calWcapCalendarItems.js