Bug 1151472 - Remove use of expression closure in calendar/. r=Fallen
authorTooru Fujisawa <arai_a@mac.com>
Sun, 16 Aug 2015 06:50:46 +0900
changeset 23204 ab6c50b76ed3909054735301c7ea32c9f5f753da
parent 23203 82a4180e351fe45de2255efd09f03517f88ead65
child 23205 670ecad50bcb11baa9a97099a334eb54eaf2292d
push id1510
push usermbanner@mozilla.com
push dateThu, 29 Oct 2015 19:29:37 +0000
treeherdercomm-beta@d1522aaa8689 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFallen
bugs1151472
Bug 1151472 - Remove use of expression closure in calendar/. r=Fallen
calendar/base/backend/icaljs/calDateTime.js
calendar/base/backend/icaljs/calDuration.js
calendar/base/backend/icaljs/calICSService.js
calendar/base/backend/icaljs/calPeriod.js
calendar/base/backend/icaljs/calRecurrenceRule.js
calendar/base/content/calendar-multiday-view.xml
calendar/base/content/calendar-ui-utils.js
calendar/base/content/calendar-unifinder.js
calendar/base/content/calendar-views.js
calendar/base/content/dialogs/calendar-creation.js
calendar/base/content/dialogs/calendar-dialog-utils.js
calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
calendar/base/content/dialogs/calendar-event-dialog-reminder.js
calendar/base/content/dialogs/calendar-providerUninstall-dialog.js
calendar/base/content/widgets/calendar-list-tree.xml
calendar/base/content/widgets/calendar-widgets.xml
calendar/base/modules/calExtract.jsm
calendar/base/modules/calItipUtils.jsm
calendar/base/modules/calPrintUtils.jsm
calendar/base/modules/ical.js
calendar/base/src/calCachedCalendar.js
calendar/base/src/calCalendarManager.js
calendar/base/src/calItemBase.js
calendar/base/src/calProtocolHandler.js
calendar/base/src/calRecurrenceDate.js
calendar/base/src/calTimezone.js
calendar/base/src/calTimezoneService.js
calendar/base/src/calUtils.js
calendar/import-export/calListFormatter.js
calendar/import-export/calMonthGridPrinter.js
calendar/import-export/calOutlookCSVImportExport.js
calendar/import-export/calWeekPrinter.js
calendar/itip/calItipEmailTransport.js
calendar/lightning/components/calItipProtocolHandler.js
calendar/lightning/content/imip-bar.js
calendar/lightning/content/messenger-overlay-sidebar.js
calendar/providers/caldav/calDavCalendar.js
calendar/providers/composite/calCompositeCalendar.js
calendar/providers/gdata/components/calGoogleCalendar.js
calendar/providers/gdata/content/gdata-calendar-creation.js
calendar/providers/gdata/content/gdata-calendar-event-dialog.js
calendar/providers/gdata/content/gdata-calendar-properties.js
calendar/providers/gdata/modules/OAuth2.jsm
calendar/providers/gdata/modules/gdataRequest.jsm
calendar/providers/gdata/modules/gdataSession.jsm
calendar/providers/gdata/modules/gdataUtils.jsm
calendar/providers/gdata/modules/shim/Calendar.jsm
calendar/providers/gdata/modules/shim/Http.jsm
calendar/providers/gdata/modules/shim/Loader.jsm
calendar/providers/gdata/modules/shim/Preferences.jsm
calendar/providers/gdata/modules/shim/Promise.jsm
calendar/providers/gdata/modules/shim/PromiseExtras.jsm
calendar/providers/storage/calStorageUpgrade.jsm
calendar/providers/wcap/calWcapCalendarItems.js
calendar/resources/content/calendarCreation.js
calendar/test/mozmill/testLocalICS.js
calendar/test/unit/test_alarm.js
calendar/test/unit/test_alarmservice.js
calendar/test/unit/test_calmgr.js
calendar/test/unit/test_deleted_items.js
calendar/test/unit/test_gdata_provider.js
calendar/test/unit/test_hashedarray.js
calendar/test/unit/test_items.js
calendar/test/unit/test_recur.js
calendar/test/unit/test_utils.js
--- a/calendar/base/backend/icaljs/calDateTime.js
+++ b/calendar/base/backend/icaljs/calDateTime.js
@@ -21,66 +21,66 @@ calDateTime.prototype = {
     classInfo: XPCOMUtils.generateCI({
         contractID: "@mozilla.org/calendar/datetime;1",
         classDescription: "Describes a Date/Time Object",
         classID: calDateTimeClassID,
         interfaces: calDateTimeInterfaces
     }),
 
     isMutable: true,
-    makeImmutable: function() this.isMutable = false,
-    clone: function() new calDateTime(this.innerObject.clone()),
+    makeImmutable: function () { this.isMutable = false; },
+    clone: function() { return new calDateTime(this.innerObject.clone()); },
 
     isValid: true,
     innerObject: null,
 
-    get nativeTime() this.innerObject.toUnixTime() * UNIX_TIME_TO_PRTIME,
-    set nativeTime(val) this.innerObject.fromUnixTime(val / UNIX_TIME_TO_PRTIME),
+    get nativeTime() { return this.innerObject.toUnixTime() * UNIX_TIME_TO_PRTIME; },
+    set nativeTime(val) { this.innerObject.fromUnixTime(val / UNIX_TIME_TO_PRTIME); },
 
-    get year() this.innerObject.year,
-    set year(val) this.innerObject.year = val,
+    get year() { return this.innerObject.year; },
+    set year(val) { this.innerObject.year = val; },
 
-    get month() this.innerObject.month - 1,
-    set month(val) this.innerObject.month = val + 1,
+    get month() { return this.innerObject.month - 1; },
+    set month(val) { this.innerObject.month = val + 1; },
 
-    get day() this.innerObject.day,
-    set day(val) this.innerObject.day = val,
+    get day() { return this.innerObject.day; },
+    set day(val) { this.innerObject.day = val; },
 
-    get hour() this.innerObject.hour,
-    set hour(val) this.innerObject.hour = val,
+    get hour() { return this.innerObject.hour; },
+    set hour(val) { this.innerObject.hour = val; },
 
-    get minute() this.innerObject.minute,
-    set minute(val) this.innerObject.minute = val,
+    get minute() { return this.innerObject.minute; },
+    set minute(val) { this.innerObject.minute = val; },
 
-    get second() this.innerObject.second,
-    set second(val) this.innerObject.second = val,
+    get second() { return this.innerObject.second; },
+    set second(val) { this.innerObject.second = val; },
 
-    get timezone() new calICALJSTimezone(this.innerObject.zone),
-    set timezone(val) unwrapSetter(ICAL.Timezone, val, function(val) {
+    get timezone() { return new calICALJSTimezone(this.innerObject.zone); },
+    set timezone(val) { unwrapSetter(ICAL.Timezone, val, function(val) {
         return this.innerObject.zone = val;
-    }, this),
+    }, this); },
 
     resetTo: function (yr,mo,dy,hr,mi,sc,tz) {
         this.innerObject.fromData({
             year: yr, month: mo + 1, day: dy,
             hour: hr, minute: mi, second: sc,
         });
         this.timezone = tz;
     },
 
-    reset: function() this.innerObject.reset(),
+    reset: function() { this.innerObject.reset(); },
 
-    get timezoneOffset() this.innerObject.utcOffset(),
-    get isDate() this.innerObject.isDate,
-    set isDate(val) this.innerObject.isDate = val,
+    get timezoneOffset() { return this.innerObject.utcOffset(); },
+    get isDate() { return this.innerObject.isDate; },
+    set isDate(val) { this.innerObject.isDate = val; },
 
-    get weekday() this.innerObject.dayOfWeek() - 1,
-    get yearday() this.innerObject.dayOfYear(),
+    get weekday() { return this.innerObject.dayOfWeek() - 1; },
+    get yearday() { return this.innerObject.dayOfYear(); },
 
-    toString: function() this.innerObject.toString(),
+    toString: function() { return this.innerObject.toString(); },
 
     getInTimezone: unwrap(ICAL.Timezone, function(val) {
         return new calDateTime(this.innerObject.convertToZone(val));
     }),
 
     addDuration: unwrap(ICAL.Duration, function(val) {
         this.innerObject.addDuration(val);
     }),
@@ -104,24 +104,24 @@ calDateTime.prototype = {
             // Lightning expects 20120101 and 20120101T010101 to be equal
             return a.compareDateOnlyTz(b, a.zone);
         } else {
             // If both are dates or date-times, then just do the normal compare
             return a.compare(b);
         }
     }),
 
-    get startOfWeek() new calDateTime(this.innerObject.startOfWeek()),
-    get endOfWeek() new calDateTime(this.innerObject.endOfWeek()),
-    get startOfMonth() new calDateTime(this.innerObject.startOfMonth()),
-    get endOfMonth() new calDateTime(this.innerObject.endOfMonth()),
-    get startOfYear() new calDateTime(this.innerObject.startOfYear()),
-    get endOfYear() new calDateTime(this.innerObject.endOfYear()),
+    get startOfWeek() { return new calDateTime(this.innerObject.startOfWeek()); },
+    get endOfWeek() { return new calDateTime(this.innerObject.endOfWeek()); },
+    get startOfMonth() { return new calDateTime(this.innerObject.startOfMonth()); },
+    get endOfMonth() { return new calDateTime(this.innerObject.endOfMonth()); },
+    get startOfYear() { return new calDateTime(this.innerObject.startOfYear()); },
+    get endOfYear() { return new calDateTime(this.innerObject.endOfYear()); },
 
-    get icalString() this.innerObject.toICALString(),
+    get icalString() { return this.innerObject.toICALString(); },
     set icalString(val) {
         let jcalString;
         if (val.length > 10) {
            jcalString = ICAL.design.value["date-time"].fromICAL(val);
         } else {
            jcalString = ICAL.design.value.date.fromICAL(val);
         }
         this.innerObject = ICAL.Time.fromString(jcalString);
--- a/calendar/base/backend/icaljs/calDuration.js
+++ b/calendar/base/backend/icaljs/calDuration.js
@@ -17,51 +17,51 @@ calDuration.prototype = {
     classID: calDurationClassID,
     classInfo: XPCOMUtils.generateCI({
         contractID: "@mozilla.org/calendar/duration;1",
         classDescription: "Calendar Duration Object",
         classID: calDurationClassID,
         interfaces: calDurationInterfaces
     }),
 
-    get icalDuration() this.innerObject,
-    set icalDuration(val) this.innerObject = val,
+    get icalDuration() { return this.innerObject; },
+    set icalDuration(val) { this.innerObject = val; },
 
     isMutable: true,
-    makeImmutable: function() this.isMutable = false,
-    clone: function() new calDuration(this.innerObject.clone()),
+    makeImmutable: function() { this.isMutable = false; },
+    clone: function() { return new calDuration(this.innerObject.clone()); },
 
-    get isNegative() this.innerObject.isNegative,
-    set isNegative(val) this.innerObject.isNegative = val,
+    get isNegative() { return this.innerObject.isNegative; },
+    set isNegative(val) { this.innerObject.isNegative = val; },
 
-    get weeks() this.innerObject.weeks,
-    set weeks(val) this.innerObject.weeks = val,
+    get weeks() { return this.innerObject.weeks; },
+    set weeks(val) { this.innerObject.weeks = val; },
 
-    get days() this.innerObject.days,
-    set days(val) this.innerObject.days = val,
+    get days() { return this.innerObject.days; },
+    set days(val) { this.innerObject.days = val; },
 
-    get hours() this.innerObject.hours,
-    set hours(val) this.innerObject.hours = val,
+    get hours() { return this.innerObject.hours; },
+    set hours(val) { this.innerObject.hours = val; },
 
-    get minutes() this.innerObject.minutes,
-    set minutes(val) this.innerObject.minutes = val,
+    get minutes() { return this.innerObject.minutes; },
+    set minutes(val) { this.innerObject.minutes = val; },
 
-    get seconds() this.innerObject.seconds,
-    set seconds(val) this.innerObject.seconds = val,
+    get seconds() { return this.innerObject.seconds; },
+    set seconds(val) { this.innerObject.seconds = val; },
 
-    get inSeconds() this.innerObject.toSeconds(),
-    set inSeconds(val) this.innerObject.fromSeconds(val),
+    get inSeconds() { return this.innerObject.toSeconds(); },
+    set inSeconds(val) { this.innerObject.fromSeconds(val); },
 
     addDuration: unwrap(ICAL.Duration, function(val) {
         this.innerObject.fromSeconds(this.innerObject.toSeconds() + val.toSeconds());
     }),
 
     compare: unwrap(ICAL.Duration, function(val) {
         return this.innerObject.compare(val);
     }),
 
-    reset: function() this.innerObject.reset(),
-    normalize: function() this.innerObject.normalize(),
-    toString: function() this.innerObject.toString(),
+    reset: function() { this.innerObject.reset(); },
+    normalize: function() { this.innerObject.normalize(); },
+    toString: function() { return this.innerObject.toString(); },
 
-    get icalString() this.innerObject.toString(),
-    set icalString(val) this.innerObject = ICAL.Duration.fromString(val)
+    get icalString() { return this.innerObject.toString(); },
+    set icalString(val) { this.innerObject = ICAL.Duration.fromString(val); }
 };
--- a/calendar/base/backend/icaljs/calICSService.js
+++ b/calendar/base/backend/icaljs/calICSService.js
@@ -18,22 +18,22 @@ calIcalProperty.prototype = {
     classID: calIcalPropertyClassID,
     classInfo: XPCOMUtils.generateCI({
         contractID: "@mozilla.org/calendar/ical-property;1",
         classDescription: "Wrapper for a libical property",
         classID: calIcalPropertyClassID,
         interfaces: calIcalPropertyInterfaces
     }),
 
-    get icalString() this.innerObject.toICAL() + ICAL.newLineChar,
-    get icalProperty() this.innerObject,
-    set icalProperty(val) this.innerObject = val,
+    get icalString() { return this.innerObject.toICAL() + ICAL.newLineChar; },
+    get icalProperty() { return this.innerObject; },
+    set icalProperty(val) { this.innerObject = val; },
 
-    get parent() this.innerObject.parent,
-    toString: function() this.innerObject.toICAL(),
+    get parent() { return this.innerObject.parent; },
+    toString: function() { return this.innerObject.toICAL(); },
 
     get value() {
         // Unescaped value for properties of TEXT or X- type, escaped otherwise.
         // In both cases, innerObject.type is "text".
         if (this.innerObject.type == "text") {
             return this.innerObject.getValues().join(",")
         }
         return this.valueAsIcalString;
@@ -60,32 +60,32 @@ calIcalProperty.prototype = {
     },
 
     get valueAsDatetime() {
         let val = this.innerObject.getFirstValue();
         let isIcalTime = val && (typeof val == "object") &&
                          ("icalclass" in val) && val.icalclass == "icaltime";
         return (isIcalTime ? new calDateTime(val) : null);
     },
-    set valueAsDatetime(val) unwrapSetter(ICAL.Time, val, function(val) {
+    set valueAsDatetime(val) { unwrapSetter(ICAL.Time, val, function(val) {
         if (val && val.zone &&
             val.zone != ICAL.Timezone.utcTimezone &&
             val.zone != ICAL.Timezone.localTimezone) {
             this.innerObject.setParameter("TZID", val.zone.tzid);
             if (this.parent) {
                 let tzref = wrapGetter(calICALJSTimezone, val.zone);
                 this.parent.addTimezoneReference(tzref);
             }
         } else {
             this.innerObject.removeParameter("TZID");
         }
         this.innerObject.setValue(val);
-    }, this),
+    }, this); },
 
-    get propertyName() this.innerObject.name.toUpperCase(),
+    get propertyName() { return this.innerObject.name.toUpperCase(); },
 
     getParameter: function(name) {
         // Unfortuantely getting the "VALUE" parameter won't work, since in
         // jCal it has been translated to the value type id.
         if (name == "VALUE") {
             let propname = this.innerObject.name.toLowerCase();
             if (propname in ICAL.design.property) {
                 let details = ICAL.design.property[propname];
@@ -213,23 +213,23 @@ calIcalComponent.prototype = {
     classID: calIcalComponentClassID,
     classInfo: XPCOMUtils.generateCI({
         contractID: "@mozilla.org/calendar/ical-component;1",
         classDescription: "Wrapper for a icaljs component",
         classID: calIcalComponentClassID,
         interfaces: calIcalComponentInterfaces
     }),
 
-    clone: function() new calIcalComponent(new ICAL.Component(this.innerObject.toJSON())),
+    clone: function() { return new calIcalComponent(new ICAL.Component(this.innerObject.toJSON())); },
 
-    get parent() wrapGetter(calIcalComponent, this.innerObject.parent),
+    get parent() { return wrapGetter(calIcalComponent, this.innerObject.parent); },
 
-    get icalTimezone() this.innerObject.name == "vtimezone" ? this.innerObject : null,
-    get icalComponent() this.innerObject,
-    set icalComponent(val) this.innerObject = val,
+    get icalTimezone() { return this.innerObject.name == "vtimezone" ? this.innerObject : null; },
+    get icalComponent() { return this.innerObject; },
+    set icalComponent(val) { this.innerObject = val; },
 
     componentIterator: null,
     getFirstSubcomponent: function(kind) {
         if (kind == "ANY") {
             kind = null;
         } else if (kind) {
             kind = kind.toLowerCase();
         }
@@ -250,98 +250,98 @@ calIcalComponent.prototype = {
                 this.componentIterator = null;
                 return null;
             }
         } else {
             return this.getFirstSubcomponent(kind);
         }
     },
 
-    get componentType() this.innerObject.name.toUpperCase(),
+    get componentType() { return this.innerObject.name.toUpperCase(); },
 
-    get uid() this.innerObject.getFirstPropertyValue("uid"),
-    set uid(val) this.innerObject.updatePropertyWithValue("uid", val),
+    get uid() { return this.innerObject.getFirstPropertyValue("uid"); },
+    set uid(val) { this.innerObject.updatePropertyWithValue("uid", val); },
 
-    get prodid() this.innerObject.getFirstPropertyValue("prodid"),
-    set prodid(val) this.innerObject.updatePropertyWithValue("prodid", val),
+    get prodid() { return this.innerObject.getFirstPropertyValue("prodid"); },
+    set prodid(val) { this.innerObject.updatePropertyWithValue("prodid", val); },
 
-    get version() this.innerObject.getFirstPropertyValue("version"),
-    set version(val) this.innerObject.updatePropertyWithValue("version", val),
+    get version() { return this.innerObject.getFirstPropertyValue("version"); },
+    set version(val) { this.innerObject.updatePropertyWithValue("version", val); },
 
-    get method() this.innerObject.getFirstPropertyValue("method"),
-    set method(val) this.innerObject.updatePropertyWithValue("method", val),
+    get method() { return this.innerObject.getFirstPropertyValue("method"); },
+    set method(val) { this.innerObject.updatePropertyWithValue("method", val); },
 
-    get status() this.innerObject.getFirstPropertyValue("status"),
-    set status(val) this.innerObject.updatePropertyWithValue("status", val),
+    get status() { return this.innerObject.getFirstPropertyValue("status"); },
+    set status(val) { this.innerObject.updatePropertyWithValue("status", val); },
 
-    get summary() this.innerObject.getFirstPropertyValue("summary"),
-    set summary(val) this.innerObject.updatePropertyWithValue("summary", val),
+    get summary() { return this.innerObject.getFirstPropertyValue("summary"); },
+    set summary(val) { this.innerObject.updatePropertyWithValue("summary", val); },
 
-    get description() this.innerObject.getFirstPropertyValue("description"),
-    set description(val) this.innerObject.updatePropertyWithValue("description", val),
+    get description() { return this.innerObject.getFirstPropertyValue("description"); },
+    set description(val) { this.innerObject.updatePropertyWithValue("description", val); },
 
-    get location() this.innerObject.getFirstPropertyValue("location"),
-    set location(val) this.innerObject.updatePropertyWithValue("location", val),
+    get location() { return this.innerObject.getFirstPropertyValue("location"); },
+    set location(val) { this.innerObject.updatePropertyWithValue("location", val); },
 
-    get categories() this.innerObject.getFirstPropertyValue("categories"),
-    set categories(val) this.innerObject.updatePropertyWithValue("categories", val),
+    get categories() { return this.innerObject.getFirstPropertyValue("categories"); },
+    set categories(val) { this.innerObject.updatePropertyWithValue("categories", val); },
 
-    get URL() this.innerObject.getFirstPropertyValue("url"),
-    set URL(val) this.innerObject.updatePropertyWithValue("url", val),
+    get URL() { return this.innerObject.getFirstPropertyValue("url"); },
+    set URL(val) { this.innerObject.updatePropertyWithValue("url", val); },
 
     get priority() {
         // If there is no value for this integer property, then we must return
         // the designated INVALID_VALUE.
         const INVALID_VALUE = Components.interfaces.calIIcalComponent.INVALID_VALUE;
         let prop = this.innerObject.getFirstProperty("priority");
         let val = prop ? prop.getFirstValue() : null;
         return (val === null ?  INVALID_VALUE : val);
     },
-    set priority(val) this.innerObject.updatePropertyWithValue("priority", val),
+    set priority(val) { this.innerObject.updatePropertyWithValue("priority", val); },
 
     _setTimeAttr: function(propName, val) {
         let prop = this.innerObject.updatePropertyWithValue(propName, val);
         if (val && val.zone &&
             val.zone != ICAL.Timezone.utcTimezone &&
             val.zone != ICAL.Timezone.localTimezone) {
             prop.setParameter("TZID", val.zone.tzid);
             this.addTimezoneReference(wrapGetter(calICALJSTimezone, val.zone));
         } else {
             prop.removeParameter("TZID");
         }
     },
 
-    get startTime() wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("dtstart")),
-    set startTime(val) unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "dtstart"), this),
+    get startTime() { return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("dtstart")); },
+    set startTime(val) { unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "dtstart"), this); },
 
-    get endTime() wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("dtend")),
-    set endTime(val) unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "dtend"), this),
+    get endTime() { return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("dtend")); },
+    set endTime(val) { unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "dtend"), this); },
 
-    get duration() wrapGetter(calDuration, this.innerObject.getFirstPropertyValue("duration")),
+    get duration() { return wrapGetter(calDuration, this.innerObject.getFirstPropertyValue("duration")); },
 
-    get dueTime() wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("due")),
-    set dueTime(val) unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "due"), this),
+    get dueTime() { return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("due")); },
+    set dueTime(val) { unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "due"), this); },
 
-    get stampTime() wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("dtstamp")),
-    set stampTime(val) unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "dtstamp"), this),
+    get stampTime() { return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("dtstamp")); },
+    set stampTime(val) { unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "dtstamp"), this); },
 
-    get createdTime() wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("created")),
-    set createdTime(val) unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "created"), this),
+    get createdTime() { return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("created")); },
+    set createdTime(val) { unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "created"), this); },
 
-    get completedTime() wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("completed")),
-    set completedTime(val) unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "completed"), this),
+    get completedTime() { return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("completed")); },
+    set completedTime(val) { unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "completed"), this); },
 
-    get lastModified() wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("last-modified")),
-    set lastModified(val) unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "last-modified"), this),
+    get lastModified() { return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("last-modified")); },
+    set lastModified(val) { unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "last-modified"), this); },
 
-    get recurrenceId() wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("recurrence-id")),
-    set recurrenceId(val) unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "recurrence-id"), this),
+    get recurrenceId() { return wrapGetter(calDateTime, this.innerObject.getFirstPropertyValue("recurrence-id")); },
+    set recurrenceId(val) { unwrapSetter(ICAL.Time, val, this._setTimeAttr.bind(this, "recurrence-id"), this); },
 
-    serializeToICS: function() this.innerObject.toString() + ICAL.newLineChar,
-    toString: function() this.innerObject.toString(),
+    serializeToICS: function() { return this.innerObject.toString() + ICAL.newLineChar; },
+    toString: function() { return this.innerObject.toString(); },
 
     addSubcomponent: function(comp) {
         comp.getReferencedTimezones({}).forEach(this.addTimezoneReference, this);
         let jscomp = unwrapSingle(ICAL.Component, comp);
         this.innerObject.addSubcomponent(jscomp);
     },
 
     propertyIterator: null,
--- a/calendar/base/backend/icaljs/calPeriod.js
+++ b/calendar/base/backend/icaljs/calPeriod.js
@@ -20,38 +20,38 @@ calPeriod.prototype = {
         classDescription: "A period between two dates",
         classID: calPeriodClassID,
         interfaces: calPeriodInterfaces
     }),
 
     isMutable: true,
     innerObject: null,
 
-    get icalPeriod() this.innerObject,
-    set icalPeriod(val) this.innerObject = val,
+    get icalPeriod() { return this.innerObject; },
+    set icalPeriod(val) { this.innerObject = val; },
 
-    makeImmutable: function() this.isMutable = false,
-    clone: function() new calPeriod(this.innerObject.clone()),
+    makeImmutable: function() { this.isMutable = false; },
+    clone: function() { return new calPeriod(this.innerObject.clone()); },
 
-    get start() wrapGetter(calDateTime, this.innerObject.start),
-    set start(val) unwrapSetter(ICAL.Time, val, function(val) {
+    get start() { return wrapGetter(calDateTime, this.innerObject.start); },
+    set start(val) { unwrapSetter(ICAL.Time, val, function(val) {
         this.innerObject.start = val;
-    }, this),
+    }, this); },
 
-    get end() wrapGetter(calDateTime, this.innerObject.getEnd()),
-    set end(val) unwrapSetter(ICAL.Time, val, function(val) {
+    get end() { return wrapGetter(calDateTime, this.innerObject.getEnd()); },
+    set end(val) { unwrapSetter(ICAL.Time, val, function(val) {
         if (this.innerObject.duration) {
             this.innerObject.duration = null;
         }
         this.innerObject.end = val;
-    }, this),
+    }, this); },
 
-    get duration() wrapGetter(calDuration, this.innerObject.getDuration()),
+    get duration() { return wrapGetter(calDuration, this.innerObject.getDuration()); },
 
-    get icalString() this.innerObject.toICALString(),
+    get icalString() { return this.innerObject.toICALString(); },
     set icalString(val) {
         let str = ICAL.parse._parseValue(val, "period");
         this.innerObject = ICAL.Period.fromString(str);
         return val;
     },
 
-    toString: function() this.innerObject.toString()
+    toString: function() { return this.innerObject.toString(); }
 };
--- a/calendar/base/backend/icaljs/calRecurrenceRule.js
+++ b/calendar/base/backend/icaljs/calRecurrenceRule.js
@@ -21,21 +21,21 @@ calRecurrenceRule.prototype = {
         classDescription: "Calendar Recurrence Rule",
         classID: calRecurrenceRuleClassID,
         interfaces: calRecurrenceRuleInterfaces
     }),
 
     innerObject: null,
 
     isMutable: true,
-    makeImmutable: function() this.isMutable = false,
-    clone: function() new calRecurrenceRule(new ICAL.Recur(this.innerObject)),
+    makeImmutable: function() { this.isMutable = false; },
+    clone: function() { return new calRecurrenceRule(new ICAL.Recur(this.innerObject)); },
 
     isNegative: false, // We don't support EXRULE anymore
-    get isFinite() this.innerObject.isFinite(),
+    get isFinite() { return this.innerObject.isFinite(); },
 
     getNextOccurrence: function(aStartTime, aRecId) {
         aStartTime = unwrapSingle(ICAL.Time, aStartTime);
         aRecId = unwrapSingle(ICAL.Time, aRecId);
         return wrapGetter(calDateTime, this.innerObject.getNextOccurrence(aStartTime, aRecId));
     },
 
     getOccurrences: function(aStartTime, aRangeStart, aRangeEnd, aMaxCount, aCount) {
@@ -90,62 +90,62 @@ calRecurrenceRule.prototype = {
                 break;
             }
         }
 
         aCount.value = occurrences.length;
         return occurrences;
     },
 
-    get icalString() "RRULE:" + this.innerObject.toString() + ICAL.newLineChar,
-    set icalString(val) this.innerObject = ICAL.Recur.fromString(val.replace(/^RRULE:/i, "")),
+    get icalString() { return "RRULE:" + this.innerObject.toString() + ICAL.newLineChar; },
+    set icalString(val) { this.innerObject = ICAL.Recur.fromString(val.replace(/^RRULE:/i, "")); },
 
     get icalProperty() {
         let prop = new ICAL.Property("rrule");
         prop.setValue(this.innerObject);
         return new calIcalProperty(prop);
     },
-    set icalProperty(val) unwrapSetter(ICAL.Property, val, function(val) {
+    set icalProperty(val) { unwrapSetter(ICAL.Property, val, function(val) {
         this.innerObject = val.getFirstValue();
-    }, this),
+    }, this); },
 
-    get type() this.innerObject.freq,
-    set type(val) this.innerObject.freq = val,
+    get type() { return this.innerObject.freq; },
+    set type(val) { this.innerObject.freq = val; },
 
-    get interval() this.innerObject.interval,
-    set interval(val) this.innerObject.interval = val,
+    get interval() { return this.innerObject.interval; },
+    set interval(val) { this.innerObject.interval = val; },
 
     get count() {
         if (!this.isByCount) {
             throw Components.results.NS_ERROR_FAILURE;
         }
         return this.innerObject.count || -1;
     },
-    set count(val) this.innerObject.count = (val && val > 0 ? val : null),
+    set count(val) { this.innerObject.count = (val && val > 0 ? val : null); },
 
     get untilDate() {
         if (this.innerObject.until) {
             return new calDateTime(this.innerObject.until);
         } else {
             return null;
         }
     },
-    set untilDate(val) unwrapSetter(ICAL.Time, val, function(val) {
+    set untilDate(val) { unwrapSetter(ICAL.Time, val, function(val) {
         if (val.timezone != ICAL.Timezone.utcTimezone &&
             val.timezone != ICAL.Timezone.localTimezone) {
             val = val.convertToZone(ICAL.Timezone.utcTimezone);
         }
 
         this.innerObject.until = val;
-    }, this),
+    }, this); },
 
-    get isByCount() this.innerObject.isByCount(),
+    get isByCount() { return this.innerObject.isByCount(); },
 
-    get weekStart() this.innerObject.wkst - 1,
-    set weekStart(val) this.innerObject.wkst = val + 1,
+    get weekStart() { return this.innerObject.wkst - 1; },
+    set weekStart(val) { this.innerObject.wkst = val + 1; },
 
     getComponent: function(aType, aCount) {
         let values = this.innerObject.getComponent(aType);
         if (aType == "BYDAY") {
             // BYDAY values are alphanumeric: SU, MO, TU, etc..
             for (let i = 0; i < values.length; i++) {
                 let match = /^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/.exec(values[i]);
                 if (!match) {
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -725,17 +725,17 @@
               xulColumn.setAttribute("orient", otherorient);
               xulColumn.setAttribute("flex", "1");
               xulColumn.setAttribute("style", "min-width: 1px; min-height: 1px;");
               stack.appendChild(xulColumn);
 
               let numBlocksInserted = 0;
 
               // column count determined by layer with no special span columns
-              if (layer.every(function (e) !e.specialSpan)) {
+              if (layer.every(e => !e.specialSpan)) {
                   columnCount = layer.length;
               }
               spanTotal = 0;
 
               // Each layer contains a list of the columns that
               // need to be created for a span.
               for each (let column in layer) {
                   let innerColumn = createXULElement("box");
--- a/calendar/base/content/calendar-ui-utils.js
+++ b/calendar/base/content/calendar-ui-utils.js
@@ -619,23 +619,23 @@ function setupAttendanceMenu(aMenu, aIte
                 attendee = item.organizer;
             }
         }
         return attendee && attendee.participationStatus;
     }
 
     goUpdateCommand("calendar_attendance_command");
 
-    let allSingle = aItems.every(function(x) !x.recurrenceId);
+    let allSingle = aItems.every(x => !x.recurrenceId);
     setElementValue(aMenu, allSingle ? "single" : "recurring", "itemType");
 
     let firstStatusOccurrences = aItems.length && getInvStat(aItems[0]);
     let firstStatusParents = aItems.length && getInvStat(aItems[0].parentItem);
-    let sameStatusOccurrences = aItems.every(function (x) getInvStat(x) == firstStatusOccurrences);
-    let sameStatusParents = aItems.every(function (x) getInvStat(x.parentItem) == firstStatusParents)
+    let sameStatusOccurrences = aItems.every(x => getInvStat(x) == firstStatusOccurrences);
+    let sameStatusParents = aItems.every(x => getInvStat(x.parentItem) == firstStatusParents);
 
     let occurrenceChildren = aMenu.getElementsByAttribute("value", firstStatusOccurrences);
     let parentsChildren = aMenu.getElementsByAttribute("value", firstStatusParents);
 
     if (sameStatusOccurrences && occurrenceChildren[0]) {
         occurrenceChildren[0].setAttribute("checked", "true");
     }
 
--- a/calendar/base/content/calendar-unifinder.js
+++ b/calendar/base/content/calendar-unifinder.js
@@ -702,17 +702,17 @@ var unifinderTreeView = {
         }
 
         // Task categories
         properties = properties.concat(item.getCategories({})
                                            .map(formatStringForCSSRule));
 
         return properties.join(" ");
     },
-    getColumnProperties: function uTV_getColumnProperties(aCol) "",
+    getColumnProperties: function uTV_getColumnProperties(aCol) { return ""; },
 
     isContainer: function uTV_isContainer() {
         return false;
     },
 
     isContainerOpen: function uTV_isContainerOpen(aRow) {
         return false;
     },
--- a/calendar/base/content/calendar-views.js
+++ b/calendar/base/content/calendar-views.js
@@ -212,17 +212,17 @@ function switchToView(aViewType) {
      "appmenu_calendar-go-menu-previous"].forEach(function(x) {
             setupViewNode(x, "label");
             setupViewNode(x, "accesskey")
      });
 
     // Set up the labels for the view navigation
     ["previous-view-button",
      "today-view-button",
-     "next-view-button"].forEach(function(x) setupViewNode(x, "tooltiptext"));
+     "next-view-button"].forEach(x => setupViewNode(x, "tooltiptext"));
 
     try {
         selectedDay = viewDeck.selectedPanel.selectedDay;
         currentSelection = viewDeck.selectedPanel.getSelectedItems({});
     } catch (ex) {
         // This dies if no view has even been chosen this session, but that's
         // ok because we'll just use now() below.
     }
--- a/calendar/base/content/dialogs/calendar-creation.js
+++ b/calendar/base/content/dialogs/calendar-creation.js
@@ -16,17 +16,17 @@ function openLocalCalendar() {
     fp.appendFilters(nsIFilePicker.filterAll);
 
     if (fp.show() != nsIFilePicker.returnOK) {
         return;
     }
 
     let calMgr = getCalendarManager();
     let calendars = calMgr.getCalendars({});
-    if (calendars.some(function(x) x.uri == fp.fileURL)) {
+    if (calendars.some(x => x.uri == fp.fileURL)) {
         // The calendar already exists, select it and return.
         document.getElementById("calendar-list-tree-widget")
                 .tree.view.selection.select(index);
         return;
     }
 
     let openCalendar = calMgr.createCalendar("ics", fp.fileURL);
 
--- a/calendar/base/content/dialogs/calendar-dialog-utils.js
+++ b/calendar/base/content/dialogs/calendar-dialog-utils.js
@@ -129,17 +129,17 @@ function updateReminderDetails() {
     let calendar = getCurrentCalendar();
     let actionValues = calendar.getProperty("capabilities.alarms.actionValues") || ["DISPLAY"];
     let actionMap = {};
     for each (var action in actionValues) {
         actionMap[action] = true;
     }
 
     // Filter out any unsupported action types.
-    reminders = reminders.filter(function(x) x.action in actionMap);
+    reminders = reminders.filter(x => x.action in actionMap);
 
     if (reminderList.value == "custom") {
         // Depending on how many alarms we have, show either the "Multiple Alarms"
         // label or the single reminder label.
         setElementValue(reminderMultipleLabel,
                         reminders.length < 2 && "true",
                         "hidden");
         setElementValue(reminderSingleLabel,
@@ -270,32 +270,32 @@ function saveReminder(item) {
         let reminders;
 
         if (menuitem.reminders) {
             // Custom reminder entries carry their own reminder object with
             // them. Make sure to clone in case these are the original item's
             // reminders.
 
             // XXX do we need to clone here?
-            reminders = menuitem.reminders.map(function(x) x.clone());
+            reminders = menuitem.reminders.map(x => x.clone());
         } else {
             // Pre-defined entries specify the necessary information
             // as attributes attached to the menuitem elements.
             reminders = [createReminderFromMenuitem(menuitem)];
         }
 
         let alarmCaps = item.calendar.getProperty("capabilities.alarms.actionValues") ||
                         ["DISPLAY"];
         let alarmActions = {};
         for each (let action in alarmCaps) {
             alarmActions[action] = true;
         }
 
         // Make sure only alarms are saved that work in the given calendar.
-        reminders.filter(function(x) x.action in alarmActions)
+        reminders.filter(x => x.action in alarmActions)
                  .forEach(item.addAlarm, item);
     }
 
     // Compare alarms to see if something changed.
     for each (let alarm in item.getAlarms({})) {
         let ics = alarm.icalString;
         if (ics in oldAlarmMap) {
             // The new alarm is also in the old set, remember this
@@ -417,31 +417,31 @@ function commonUpdateReminder(aSuppressD
 
         let menuitem = reminderList.selectedItem;
         if (menuitem.value != 'none') {
             // In case a reminder is selected, retrieve the array of alarms from
             // it, or create one from the currently selected menuitem.
             let reminders = menuitem.reminders || [createReminderFromMenuitem(menuitem)];
 
             // If a reminder is related to the entry date...
-            if (reminders.some(function(x) x.related == x.ALARM_RELATED_START)) {
+            if (reminders.some(x => x.related == x.ALARM_RELATED_START)) {
                 // ...automatically check 'has entrydate'.
                 if (!getElementValue("todo-has-entrydate", "checked")) {
                     setElementValue("todo-has-entrydate", "true", "checked");
 
                     // Make sure gStartTime is properly initialized
                     updateEntryDate();
                 }
 
                 // Disable the checkbox to indicate that we need the entry-date.
                 disableElementWithLock("todo-has-entrydate", "reminder-lock");
             }
 
             // If a reminder is related to the due date...
-            if (reminders.some(function(x) x.related == x.ALARM_RELATED_END)) {
+            if (reminders.some(x => x.related == x.ALARM_RELATED_END)) {
                 // ...automatically check 'has duedate'.
                 if (!getElementValue("todo-has-duedate", "checked")) {
                     setElementValue("todo-has-duedate", "true", "checked");
 
                     // Make sure gStartTime is properly initialized
                     updateDueDate();
                 }
 
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
@@ -95,17 +95,17 @@ function initializeControls(rule) {
             }
             document.getElementById("yearly-group").selectedIndex = 0;
             setElementValue("yearly-days", aByMonthDay);
         }
     }
 
     function everyWeekDay(aByDay) {
         // Checks if aByDay contains only values from 1 to 7 with any order.
-        let mask = aByDay.reduce(function(v, c) v | (1 << c), 1);
+        let mask = aByDay.reduce((v, c) => v | (1 << c), 1);
         return aByDay.length == 7 && mask == Math.pow(2, 8) - 1;
     }
 
     switch (rule.type) {
         case "DAILY":
             document.getElementById("period-list").selectedIndex = 0;
             setElementValue("daily-days", rule.interval);
             break;
--- a/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
@@ -12,17 +12,17 @@ let allowedActionsMap = {};
 /**
  * Sets up the reminder dialog.
  */
 function onLoad() {
     let calendar = window.arguments[0].calendar;
 
     // Make sure the origin menulist uses the right labels, depending on if the
     // dialog is showing an event or task.
-    function _sn(x) cal.calGetString("calendar-alarms", getItemBundleStringName(x));
+    function _sn(x) { return cal.calGetString("calendar-alarms", getItemBundleStringName(x)); }
 
     setElementValue("reminder-before-start-menuitem",
                     _sn("reminderCustomOriginBeginBefore"),
                     "label");
 
     setElementValue("reminder-after-start-menuitem",
                     _sn("reminderCustomOriginBeginAfter"),
                     "label");
--- a/calendar/base/content/dialogs/calendar-providerUninstall-dialog.js
+++ b/calendar/base/content/dialogs/calendar-providerUninstall-dialog.js
@@ -4,17 +4,17 @@
 
 Components.utils.import("resource://calendar/modules/calUtils.jsm");
 
 function onLoad() {
     let extension = window.arguments[0].extension;
     document.getElementById("provider-name-label").value = extension.name;
 
     let calendars = cal.getCalendarManager().getCalendars({})
-                       .filter(function(x) x.providerID == extension.id);
+                       .filter(x => x.providerID == extension.id);
 
     document.getElementById("calendar-list-tree").calendars = calendars;
 }
 
 function onAccept() {
     // Tell our caller that the extension should be uninstalled.
     let args = window.arguments[0];
     args.shouldUninstall = true;
--- a/calendar/base/content/widgets/calendar-list-tree.xml
+++ b/calendar/base/content/widgets/calendar-list-tree.xml
@@ -373,17 +373,17 @@
           this.mCompositeCalendar = val;
           this.mCompositeCalendar.addObserver(this.compositeObserver);
           return val;
         ]]></setter>
       </property>
 
       <property name="sortOrder"
                 readonly="true"
-                onget="return this.mCalendarList.map(function(x) x.id);"/>
+                onget="return this.mCalendarList.map(x => x.id);"/>
       <property name="selectedCalendars"
                 readonly="true"
                 onget="return this.compositeCalendar.getCalendars({});"/>
       <property name="allowDrag"
                 onget="return (this.getAttribute('allowdrag') == 'true');"
                 onset="return setBooleanAttribute(this, 'allowdrag', val);"/>
       <property name="writable"
                 onget="return (this.getAttribute('writable') == 'true');"
--- a/calendar/base/content/widgets/calendar-widgets.xml
+++ b/calendar/base/content/widgets/calendar-widgets.xml
@@ -52,17 +52,17 @@
             let categoryListbox = document.getAnonymousElementByAttribute(this, "anonid", "categories-listbox");
             if (this.maxCount == 1) {
                 let selectedItem = categoryListbox.selectedItem;
                 return selectedItem ? [selectedItem.getAttribute("value")] : [];
             } else {
                 let checkedNodes = categoryListbox.getElementsByAttribute("checked", "true");
                 let sliceEnd = this.maxCount > 0 ? this.maxCount : checkedNodes.length;
                 return Array.slice(checkedNodes, 0, sliceEnd)
-                            .map(function(x) x.getAttribute("value"));
+                            .map(x => x.getAttribute("value"));
             }
         ]]></getter>
       </property>
       <property name="maxCount">
         <getter><![CDATA[
             return this._maxCount;
         ]]></getter>
         <setter><![CDATA[
--- a/calendar/base/modules/calExtract.jsm
+++ b/calendar/base/modules/calExtract.jsm
@@ -778,44 +778,44 @@ Extractor.prototype = {
 
     /**
     * Guesses start time from list of guessed datetimes
     *
     * @param isTask    whether start time should be guessed for task or event
     * @return          datetime object for start time
     */
     guessStart: function guessStart(isTask) {
-        let startTimes = this.collected.filter(function(val) val.relation == "start");
+        let startTimes = this.collected.filter(val => val.relation == "start");
         if (startTimes.length == 0) {
             return {};
         }
 
         for (let val in startTimes) {
             cal.LOG("[calExtract] Start: " + JSON.stringify(startTimes[val]));
         }
 
         let guess = {};
-        let wDayInit = startTimes.filter(function(val) val.day != null && val.start === undefined);
+        let wDayInit = startTimes.filter(val => val.day != null && val.start === undefined);
 
         // with tasks we don't try to guess start but assume email date
         if (isTask) {
             guess.year = wDayInit[0].year;
             guess.month = wDayInit[0].month;
             guess.day = wDayInit[0].day;
             guess.hour = wDayInit[0].hour;
             guess.minute = wDayInit[0].minute;
             return guess;
         }
 
-        let wDay = startTimes.filter(function(val) val.day != null && val.start !== undefined);
-        let wDayNA = wDay.filter(function(val) val.ambiguous === undefined);
+        let wDay = startTimes.filter(val => val.day != null && val.start !== undefined);
+        let wDayNA = wDay.filter(val => val.ambiguous === undefined);
 
-        let wMinute = startTimes.filter(function(val) val.minute != null && val.start !== undefined);
-        let wMinuteNA = wMinute.filter(function(val) val.ambiguous === undefined);
-        let wMinuteInit = startTimes.filter(function(val) val.minute != null && val.start === undefined);
+        let wMinute = startTimes.filter(val => val.minute != null && val.start !== undefined);
+        let wMinuteNA = wMinute.filter(val => val.ambiguous === undefined);
+        let wMinuteInit = startTimes.filter(val => val.minute != null && val.start === undefined);
 
         if (wMinuteNA.length != 0) {
             guess.hour = wMinuteNA[0].hour;
             guess.minute = wMinuteNA[0].minute;
         } else if (wMinute.length != 0) {
             guess.hour = wMinute[0].hour;
             guess.minute = wMinute[0].minute;
         }
@@ -855,29 +855,29 @@ Extractor.prototype = {
     * Guesses end time from list of guessed datetimes relative to start time
     *
     * @param start     start time to consider when guessing
     * @param isTask    whether start time should be guessed for task or event
     * @return          datetime object for end time
     */
     guessEnd: function guessEnd(start, isTask) {
         let guess = {};
-        let endTimes = this.collected.filter(function(val) val.relation == "end");
-        let durations = this.collected.filter(function(val) val.relation == "duration");
+        let endTimes = this.collected.filter(val => val.relation == "end");
+        let durations = this.collected.filter(val => val.relation == "duration");
         if (endTimes.length == 0 && durations.length == 0) {
             return {};
         } else {
             for (val in endTimes) {
                 cal.LOG("[calExtract] End: " + JSON.stringify(endTimes[val]));
             }
 
-            let wDay = endTimes.filter(function(val) val.day != null);
-            let wDayNA = wDay.filter(function(val) val.ambiguous === undefined);
-            let wMinute = endTimes.filter(function(val) val.minute != null);
-            let wMinuteNA = wMinute.filter(function(val) val.ambiguous === undefined);
+            let wDay = endTimes.filter(val => val.day != null);
+            let wDayNA = wDay.filter(val => val.ambiguous === undefined);
+            let wMinute = endTimes.filter(val => val.minute != null);
+            let wMinuteNA = wMinute.filter(val => val.ambiguous === undefined);
 
             // first set non-ambiguous dates
             let pos = isTask == true ? 0 : wDayNA.length - 1;
             if (wDayNA.length != 0) {
                 guess.year = wDayNA[pos].year;
                 guess.month = wDayNA[pos].month;
                 guess.day = wDayNA[pos].day;
             // then ambiguous dates
--- a/calendar/base/modules/calItipUtils.jsm
+++ b/calendar/base/modules/calItipUtils.jsm
@@ -805,17 +805,17 @@ cal.itip = {
      * @param aItems        List of items to be contained in the new itipItem
      * @param aProps        List of properties to be different in the new itipItem
      */
     getModifiedItipItem: function cal_getModifiedItipItem(aItipItem, aItems, aProps) {
 
         let itipItem = Components.classes["@mozilla.org/calendar/itip-item;1"]
                                  .createInstance(Components.interfaces.calIItipItem);
         let serializedItems = "";
-        (aItems || []).forEach(function(item) serializedItems += cal.getSerializedItem(item));
+        (aItems || []).forEach(item => serializedItems += cal.getSerializedItem(item));
         itipItem.init(serializedItems);
 
         let props = aProps || {};
         itipItem.autoResponse = ("autoResponse" in props) ? props.autoResponse : aItipItem.autoResponse;
         itipItem.identity = ("identity" in props) ? props.identity : aItipItem.identity;
         itipItem.isSend = ("isSend" in props) ? props.isSend : aItipItem.isSend;
         itipItem.localStatus = ("localStatus" in props) ? props.localStatus : aItipItem.localStatus;
         itipItem.receivedMethod = ("receivedMethod" in props) ? props.receivedMethod : aItipItem.receivedMethod;
--- a/calendar/base/modules/calPrintUtils.jsm
+++ b/calendar/base/modules/calPrintUtils.jsm
@@ -144,17 +144,17 @@ cal.print = {
         // Fill in details of the task
         if (item.isCompleted) {
             taskNode.querySelector(".task-checkbox").setAttribute("checked", "checked");
         }
 
         taskNode.querySelector(".task-title").textContent = item.title;
 
         let collator = cal.createLocaleCollator();
-        cal.binaryInsertNode(taskContainer, taskNode, item, function(a, b) collator.compareString(0, a, b), function(node) node.item.title);
+        cal.binaryInsertNode(taskContainer, taskNode, item, (a, b) => collator.compareString(0, a, b), node => node.item.title);
     },
 
     /**
      * Get time interval string for the given item. Returns an empty string for all-day items.
      *
      * @param aItem     The item providing the interval
      * @return          The string describing the interval
      */
--- a/calendar/base/modules/ical.js
+++ b/calendar/base/modules/ical.js
@@ -14,17 +14,17 @@
 
 var EXPORTED_SYMBOLS = ["ICAL", "unwrap", "unwrapSetter", "unwrapSingle", "wrapGetter"];
 
 function wrapGetter(type, val) {
     return val ? new type(val) : null;
 }
 
 function unwrap(type, innerFunc) {
-    return function(val) unwrapSetter.call(this, type, val, innerFunc);
+    return function(val) { return unwrapSetter.call(this, type, val, innerFunc); };
 }
 
 function unwrapSetter(type, val, innerFunc, thisObj) {
     return innerFunc.call(thisObj || this, unwrapSingle(type, val));
 }
 
 function unwrapSingle(type, val) {
     if (!val || !val.wrappedJSObject) {
--- a/calendar/base/src/calCachedCalendar.js
+++ b/calendar/base/src/calCachedCalendar.js
@@ -427,17 +427,17 @@ calCachedCalendar.prototype = {
                                     // Item has already been deleted from the server, no need to change anything.
                                 }
                                 break;
                         }
                     },
                     function completed() {
                         this_.offlineCachedItems = {};
                         this_.offlineCachedItemFlags = {};
-                        this_.playbackOfflineItems(function() emptyQueue(aStatus));
+                        this_.playbackOfflineItems(() => emptyQueue(aStatus));
                     });
                 } else {
                     this_.playbackOfflineItems(function() {this_.mCachedObserver.onLoad(this_.mCachedCalendar);});
                     emptyQueue(aStatus);
                 }
             }
         };
 
--- a/calendar/base/src/calCalendarManager.js
+++ b/calendar/base/src/calCalendarManager.js
@@ -31,19 +31,19 @@ calCalendarManager.prototype = {
     classInfo: XPCOMUtils.generateCI({
         classID: calCalendarManagerClassID,
         contractID: "@mozilla.org/calendar/manager;1",
         classDescription: "Calendar Manager",
         interfaces: calCalendarManagerInterfaces,
         flags: Components.interfaces.nsIClassInfo.SINGLETON
     }),
 
-    get networkCalendarCount() this.mNetworkCalendarCount,
-    get readOnlyCalendarCount() this.mReadonlyCalendarCount,
-    get calendarCount() this.mCalendarCount,
+    get networkCalendarCount() { return this.mNetworkCalendarCount; },
+    get readOnlyCalendarCount() { return this.mReadonlyCalendarCount; },
+    get calendarCount() { return this.mCalendarCount; },
 
     // calIStartupService:
     startup: function ccm_startup(aCompleteListener) {
         AddonManager.addAddonListener(gCalendarManagerAddonListener);
         this.checkAndMigrateDB();
         this.mCache = null;
         this.mCalObservers = null;
         this.mRefreshTimer = {};
@@ -753,24 +753,24 @@ calCalendarManager.prototype = {
     deleteCalendarPref_: function(calendar, name) {
         cal.ASSERT(calendar, "Invalid Calendar!");
         cal.ASSERT(calendar.id !== null, "Calendar id needs to be set!");
         cal.ASSERT(name && name.length > 0, "Pref Name must be non-empty!");
         Services.prefs.deleteBranch(getPrefBranchFor(calendar.id) + name);
     },
 
     mObservers: null,
-    addObserver: function(aObserver) this.mObservers.add(aObserver),
-    removeObserver: function(aObserver) this.mObservers.remove(aObserver),
-    notifyObservers: function(functionName, args) this.mObservers.notify(functionName, args),
+    addObserver: function(aObserver) { return this.mObservers.add(aObserver); },
+    removeObserver: function(aObserver) { return this.mObservers.remove(aObserver); },
+    notifyObservers: function(functionName, args) { return this.mObservers.notify(functionName, args); },
 
     mCalendarObservers: null,
-    addCalendarObserver: function(aObserver) this.mCalendarObservers.add(aObserver),
-    removeCalendarObserver: function(aObserver) this.mCalendarObservers.remove(aObserver),
-    notifyCalendarObservers: function(functionName, args) this.mCalendarObservers.notify(functionName, args)
+    addCalendarObserver: function(aObserver) { return this.mCalendarObservers.add(aObserver); },
+    removeCalendarObserver: function(aObserver) { return this.mCalendarObservers.remove(aObserver); },
+    notifyCalendarObservers: function(functionName, args) { return this.mCalendarObservers.notify(functionName, args); }
 };
 
 function equalMessage(msg1, msg2) {
     if (msg1.GetString(0) == msg2.GetString(0) &&
         msg1.GetString(1) == msg2.GetString(1) &&
         msg1.GetString(2) == msg2.GetString(2)) {
         return true;
     }
@@ -791,22 +791,22 @@ calMgrCalendarObserver.prototype = {
     calMgr: null,
 
     QueryInterface: XPCOMUtils.generateQI([
         Components.interfaces.nsIWindowMediatorListener,
         Components.interfaces.calIObserver
     ]),
 
     // calIObserver:
-    onStartBatch: function() this.calMgr.notifyCalendarObservers("onStartBatch", arguments),
-    onEndBatch: function() this.calMgr.notifyCalendarObservers("onEndBatch", arguments),
-    onLoad: function(calendar) this.calMgr.notifyCalendarObservers("onLoad", arguments),
-    onAddItem: function(aItem) this.calMgr.notifyCalendarObservers("onAddItem", arguments),
-    onModifyItem: function(aNewItem, aOldItem) this.calMgr.notifyCalendarObservers("onModifyItem", arguments),
-    onDeleteItem: function(aDeletedItem) this.calMgr.notifyCalendarObservers("onDeleteItem", arguments),
+    onStartBatch: function() { return this.calMgr.notifyCalendarObservers("onStartBatch", arguments); },
+    onEndBatch: function() { return this.calMgr.notifyCalendarObservers("onEndBatch", arguments); },
+    onLoad: function(calendar) { return this.calMgr.notifyCalendarObservers("onLoad", arguments); },
+    onAddItem: function(aItem) { return this.calMgr.notifyCalendarObservers("onAddItem", arguments); },
+    onModifyItem: function(aNewItem, aOldItem) { return this.calMgr.notifyCalendarObservers("onModifyItem", arguments); },
+    onDeleteItem: function(aDeletedItem) { return this.calMgr.notifyCalendarObservers("onDeleteItem", arguments); },
     onError: function(aCalendar, aErrNo, aMessage) {
         this.calMgr.notifyCalendarObservers("onError", arguments);
         this.announceError(aCalendar, aErrNo, aMessage);
     },
 
     onPropertyChanged: function(aCalendar, aName, aValue, aOldValue) {
         this.calMgr.notifyCalendarObservers("onPropertyChanged", arguments);
         switch (aName) {
--- a/calendar/base/src/calItemBase.js
+++ b/calendar/base/src/calItemBase.js
@@ -588,17 +588,17 @@ calItemBase.prototype = {
             }
         }
     },
 
     // void addAttachment(in calIAttachment attachment);
     addAttachment: function cIB_addAttachment(attachment) {
         this.modify();
         this.mAttachments = this.getAttachments({});
-        if (!this.mAttachments.some(function(x) x.hashId == attachment.hashId)) {
+        if (!this.mAttachments.some(x => x.hashId == attachment.hashId)) {
             this.mAttachments.push(attachment);
         }
     },
 
     // void removeAllAttachments();
     removeAllAttachments: function cIB_removeAllAttachments() {
         this.modify();
         this.mAttachments = [];
--- a/calendar/base/src/calProtocolHandler.js
+++ b/calendar/base/src/calProtocolHandler.js
@@ -22,18 +22,18 @@ function calProtocolHandlerWebcals() {
  */
 function calProtocolHandler(scheme) {
     this.scheme = scheme;
     this.mHttpProtocol = Services.io.getProtocolHandler(this.scheme == "webcal" ? "http" : "https");
     this.wrappedJSObject = this;
 }
 
 calProtocolHandler.prototype = {
-    get defaultPort() this.mHttpProtocol.defaultPort,
-    get protocolFlags() this.mHttpProtocol.protocolFlags,
+    get defaultPort() { return this.mHttpProtocol.defaultPort; },
+    get protocolFlags() { return this.mHttpProtocol.protocolFlags; },
 
     newURI: function cph_newURI(aSpec, anOriginalCharset, aBaseURI) {
         var uri = Components.classes["@mozilla.org/network/standard-url;1"].
                              createInstance(Components.interfaces.nsIStandardURL);
         uri.init(Components.interfaces.nsIStandardURL.URLTYPE_STANDARD,
                  this.mHttpProtocol.defaultPort, aSpec, anOriginalCharset, aBaseURI);
         return uri;
     },
@@ -60,17 +60,17 @@ calProtocolHandler.prototype = {
                                                      Components.interfaces.nsILoadInfo.SEC_NORMAL,
                                                      Components.interfaces.nsIContentPolicy.TYPE_OTHER);
         }
         channel.originalURI = aUri;
         return channel;
     },
 
     // We are not overriding any special ports
-    allowPort: function cph_allowPort(aPort, aScheme) false
+    allowPort: function cph_allowPort(aPort, aScheme) { return false; }
 };
 
 const calProtocolHandlerWebcalClassID = Components.ID("{1153c73a-39be-46aa-9ba9-656d188865ca}");
 const calProtocolHandlerWebcalInterfaces = [Components.interfaces.nsIProtocolHandler];
 calProtocolHandlerWebcal.prototype = {
     __proto__: calProtocolHandler.prototype,
     classID: calProtocolHandlerWebcalClassID,
     QueryInterface: XPCOMUtils.generateQI(calProtocolHandlerWebcalInterfaces),
--- a/calendar/base/src/calRecurrenceDate.js
+++ b/calendar/base/src/calRecurrenceDate.js
@@ -37,25 +37,25 @@ calRecurrenceDate.prototype = {
 
     clone: function clone() {
         let other = new calRecurrenceDate();
         other.mDate = (this.mDate ? this.mDate.clone() : null);
         other.mIsNegative = this.mIsNegative;
         return other;
     },
 
-    get isNegative() this.mIsNegative,
+    get isNegative() { return this.mIsNegative; },
     set isNegative(val) {
         this.ensureMutable();
         return (this.mIsNegative = val);
     },
 
-    get isFinite() true,
+    get isFinite() { return true; },
 
-    get date() this.mDate,
+    get date() { return this.mDate; },
     set date(val) {
         this.ensureMutable();
         return (this.mDate = val);
     },
 
     getNextOccurrence: function getNextOccurrence(aStartTime, aOccurrenceTime) {
         if (this.mDate && this.mDate.compare(aStartTime) > 0) {
             return this.mDate;
--- a/calendar/base/src/calTimezone.js
+++ b/calendar/base/src/calTimezone.js
@@ -20,47 +20,47 @@ calICALJSTimezone.prototype = {
         contractID: "@mozilla.org/calendar/timezone;1",
         classDescription: "Calendar Timezone",
         classID: calTimezoneClassID,
         interfaces: calTimezoneInterfaces
     }),
 
     innerObject: null,
 
-    get provider() cal.getTimezoneService(),
+    get provider() { return cal.getTimezoneService(); },
     get icalComponent() {
         let innerComp = this.innerObject.component;
         let comp = null;
         if (innerComp) {
             comp = cal.getIcsService().createIcalComponent("VTIMEZONE");
             comp.icalComponent = innerComp;
         }
         return comp;
     },
-    get tzid() this.innerObject.tzid,
-    get isFloating() this.innerObject == ICAL.Timezone.localTimezone,
-    get isUTC() this.innerObject == ICAL.Timezone.utcTimezone,
-    get latitude() this.innerObject.latitude,
-    get longitude() this.innerObject.longitude,
+    get tzid() { return this.innerObject.tzid; },
+    get isFloating() { return this.innerObject == ICAL.Timezone.localTimezone; },
+    get isUTC() { return this.innerObject == ICAL.Timezone.utcTimezone; },
+    get latitude() { return this.innerObject.latitude; },
+    get longitude() { return this.innerObject.longitude; },
     get displayName() {
         let bundle = ICAL.Timezone.cal_tz_bundle;
         let stringName = "pref.timezone." + this.tzid.replace(/\//g, ".");
         let displayName = this.tzid;
         try {
             displayName = bundle.GetStringFromName(stringName);
         } catch (e) {
             // Just use the TZID if the string is mising.
         }
         this.__defineGetter__("displayName", function() {
             return displayName;
         });
         return displayName;
     },
 
-    toString: function() this.innerObject.toString()
+    tostring: function() { return this.innerObject.toString(); }
 };
 
 function calLibicalTimezone(tzid, component, latitude, longitude) {
     this.wrappedJSObject = this;
     this.tzid = tzid;
     this.mComponent = component;
     this.mUTC = false;
     this.isFloating = false;
@@ -76,17 +76,17 @@ calLibicalTimezone.prototype = {
         classID: calTimezoneClassID,
         interfaces: calTimezoneInterfaces
     }),
 
     toString: function calLibicalTimezone_toString() {
         return (this.icalComponent ? this.icalComponent.toString() : this.tzid);
     },
 
-    get isUTC() this.mUTC,
+    get isUTC() { return this.mUTC; },
 
     get icalComponent() {
         var comp = this.mComponent;
         if (comp && (typeof(comp) == "string")) {
             this.mComponent = cal.getIcsService().parseICS("BEGIN:VCALENDAR\r\n" + comp + "\r\nEND:VCALENDAR\r\n", null)
                                                  .getFirstSubcomponent("VTIMEZONE");
         }
         return this.mComponent;
@@ -100,10 +100,10 @@ calLibicalTimezone.prototype = {
                 // don't assert here, but gracefully fall back to TZID:
                 cal.LOG("Timezone property lookup failed! Falling back to " + this.tzid + "\n" + exc);
                 this.mDisplayName = this.tzid;
             }
         }
         return this.mDisplayName;
     },
 
-    get provider() cal.getTimezoneService()
+    get provider() { return cal.getTimezoneService(); }
 };
--- a/calendar/base/src/calTimezoneService.js
+++ b/calendar/base/src/calTimezoneService.js
@@ -56,17 +56,17 @@ calTimezoneService.prototype = {
         classID: calTimezoneServiceClassID,
         contractID: "@mozilla.org/calendar/timezone-service;1",
         classDescription: "Calendar Timezone Service",
         interfaces: calTimezoneServiceInterfaces,
         flags: Components.interfaces.nsIClassInfo.SINGLETON
     }),
 
     // ical.js TimezoneService methods
-    has: function(id) this.getTimezone(id) != null,
+    has: function(id) { return this.getTimezone(id) != null; },
     get: function(id) {
         return id ? unwrapSingle(ICAL.Timezone, this.getTimezone(id)) : null;
     },
     remove: function() {},
     register: function() {},
 
     // calIStartupService:
     startup: function startup(aCompleteListener) {
--- a/calendar/base/src/calUtils.js
+++ b/calendar/base/src/calUtils.js
@@ -596,17 +596,17 @@ function hashColor(str) {
                           "#33CC00", "#00CCCC", "#3366FF", "#6633FF", "#CC33CC",
                           "#666666", "#990000", "#CC6600", "#CC9933", "#999900",
                           "#009900", "#339999", "#3333FF", "#6600CC", "#993399",
                           "#333333", "#660000", "#993300", "#996633", "#666600",
                           "#006600", "#336666", "#000099", "#333399", "#663366",
                           "#000000", "#330000", "#663300", "#663333", "#333300",
                           "#003300", "#003333", "#000066", "#330099", "#330033"];
 
-    let sum = Array.map(str || " ", function(e) e.charCodeAt(0)).reduce(function(a,b) a + b);
+    let sum = Array.map(str || " ", e => e.charCodeAt(0)).reduce((a, b) => a + b);
     return colorPalette[sum % colorPalette.length];
 }
 
 /**
  * Convert categories string to list of category names.
  *
  * Stored categories may include escaped commas within a name.
  * Split categories string at commas, but not at escaped commas (\,).
@@ -1162,17 +1162,17 @@ function getProgressAtom(aTask) {
 function calInterfaceBag(iid) {
     this.init(iid);
 }
 calInterfaceBag.prototype = {
     mIid: null,
     mInterfaces: null,
 
     // Iterating the inteface bag iterates the interfaces it contains
-    [Symbol.iterator]: function() this.mInterfaces[Symbol.iterator](),
+    [Symbol.iterator]: function() { return this.mInterfaces[Symbol.iterator](); },
 
     /// internal:
     init: function calInterfaceBag_init(iid) {
         this.mIid = iid;
         this.mInterfaces = [];
     },
 
     /// external:
@@ -1801,17 +1801,17 @@ function binaryInsertNode(parentNode, in
 
         // Only add the node if duplicates should not be discarded, or if
         // they should and the childNode[newIndex] == node.
         let node = parentNode.childNodes[newIndex];
         parentNode.insertBefore(insertNode, node);
     }
     return newIndex;
 }
-binaryInsertNode.defaultAccessor = function(n) n.item;
+binaryInsertNode.defaultAccessor = n => n.item;
 
 /**
  * Insert an item into the given array, using binary search. See binarySearch
  * for a note on how the comptor works.
  *
  * @param itemArray             The array to insert into.
  * @param item                  The item to insert into the array.
  * @param comptor               A comparation function that can compare two items.
--- a/calendar/import-export/calListFormatter.js
+++ b/calendar/import-export/calListFormatter.js
@@ -20,16 +20,16 @@ calListFormatter.prototype = {
 
     classInfo: XPCOMUtils.generateCI({
         classID: calListFormatterClassID,
         contractID: "@mozilla.org/calendar/printformatter;1?type=list",
         classDescription: "Calendar List Print Formatter",
         interfaces: calListFormatterInterfaces
     }),
 
-    get name() cal.calGetString("calendar", "formatListName"),
+    get name() { return cal.calGetString("calendar", "formatListName"); },
 
     formatToHtml: function list_formatToHtml(aStream, aStart, aEnd, aCount, aItems, aTitle) {
         let htmlexporter = Components.classes["@mozilla.org/calendar/export;1?type=htmllist"]
                                      .createInstance(Components.interfaces.calIExporter);
         htmlexporter.exportToStream(aStream, aCount, aItems, aTitle);
     }
 };
--- a/calendar/import-export/calMonthGridPrinter.js
+++ b/calendar/import-export/calMonthGridPrinter.js
@@ -24,17 +24,17 @@ calMonthPrinter.prototype = {
 
     classInfo: XPCOMUtils.generateCI({
         classID: calMonthPrinterClassID,
         contractID: "@mozilla.org/calendar/printformatter;1?type=monthgrid",
         classDescription: "Calendar Month Grid Print Formatter",
         interfaces: calMonthPrinterInterfaces
     }),
 
-    get name() cal.calGetString("calendar", "monthPrinterName"),
+    get name() { return cal.calGetString("calendar", "monthPrinterName"); },
 
     formatToHtml: function monthPrint_format(aStream, aStart, aEnd, aCount, aItems, aTitle) {
         let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calMonthGridPrinter.html");
         let defaultTimezone = cal.calendarDefaultTimezone();
 
         // Set page title
         document.getElementById("title").textContent = aTitle;
 
--- a/calendar/import-export/calOutlookCSVImportExport.js
+++ b/calendar/import-export/calOutlookCSVImportExport.js
@@ -431,19 +431,19 @@ calOutlookCSVExporter.prototype = {
         classDescription: "Calendar Outlook CSV Exporter",
         interfaces: calOutlookCSVExporterInterfaces
     }),
 
     getFileTypes: getOutlookCsvFileTypes,
 
     exportToStream: function csv_exportToStream(aStream, aCount, aItems) {
         // Helper functions
-        function dateString(aDateTime) cal.dateTimeToJsDate(aDateTime).toLocaleFormat(localeEn.dateFormat);
-        function timeString(aDateTime) cal.dateTimeToJsDate(aDateTime).toLocaleFormat(localeEn.timeFormat);
-        function txtString(aString) aString || "";
+        function dateString(aDateTime) { return cal.dateTimeToJsDate(aDateTime).toLocaleFormat(localeEn.dateFormat); }
+        function timeString(aDateTime) { return cal.dateTimeToJsDate(aDateTime).toLocaleFormat(localeEn.timeFormat); }
+        function txtString(aString) { return aString || ""; }
 
         let str = "";
         let headers = [];
         // Not using a loop here, since we need to be sure the order here matches
         // with the orders the field data is added later on
         headers.push(localeEn['headTitle']);
         headers.push(localeEn['headStartDate']);
         headers.push(localeEn['headStartTime']);
--- a/calendar/import-export/calWeekPrinter.js
+++ b/calendar/import-export/calWeekPrinter.js
@@ -24,17 +24,17 @@ calWeekPrinter.prototype = {
 
     classInfo: XPCOMUtils.generateCI({
         classID: calWeekPrinterClassID,
         contractID: "@mozilla.org/calendar/printformatter;1?type=weekplan",
         classDescription: "Calendar Week Print Formatter",
         interfaces: calWeekPrinterInterfaces
     }),
 
-    get name() cal.calGetString("calendar", "weekPrinterName"),
+    get name() { return cal.calGetString("calendar", "weekPrinterName"); },
 
     formatToHtml: function weekPrint_format(aStream, aStart, aEnd, aCount, aItems, aTitle) {
         let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calWeekPrinter.html");
         let defaultTimezone = cal.calendarDefaultTimezone();
 
         // Set page title
         document.getElementById("title").textContent = aTitle;
 
--- a/calendar/itip/calItipEmailTransport.js
+++ b/calendar/itip/calItipEmailTransport.js
@@ -34,18 +34,18 @@ calItipEmailTransport.prototype = {
         interfaces: calItipEmailTransportInterfaces,
     }),
 
     mHasXpcomMail: false,
     mDefaultAccount: null,
     mDefaultIdentity: null,
     mDefaultSmtpServer: null,
 
-    get scheme() "mailto",
-    get type() "email",
+    get scheme() { return "mailto"; },
+    get type() { return "email"; },
 
     mSenderAddress: null,
     get senderAddress() {
         return this.mSenderAddress;
     },
     set senderAddress(aValue) {
         return (this.mSenderAddress = aValue);
     },
--- a/calendar/lightning/components/calItipProtocolHandler.js
+++ b/calendar/lightning/components/calItipProtocolHandler.js
@@ -67,17 +67,17 @@ ItipProtocolHandler.prototype = {
     classInfo: XPCOMUtils.generateCI({
         classID: ItipProtocolHandlerClassID,
         contractID: "@mozilla.org/network/protocol;1?name=" + ITIP_HANDLER_PROTOCOL,
         classDescription: "iTIP Protocol Handler",
         interfaces: ItipProtocolHandlerInterfaces
     }),
 
     protocolFlags: CI.nsIProtocolHandler.URI_NORELATIVE | CI.nsIProtocolHandler.URI_DANGEROUS_TO_LOAD,
-    allowPort: function () false,
+    allowPort: () => false,
     isSecure: false,
     newURI: function (spec, charSet, baseURI) {
         let cls = Components.classes["@mozilla.org/network/standard-url;1"];
         let url = cls.createInstance(CI.nsIStandardURL);
         url.init(CI.nsIStandardURL.URLTYPE_STANDARD, 0, spec, charSet, baseURI);
         dump("Creating new URI for " + spec + "\n");
         return url.QueryInterface(CI.nsIURI);
     },
--- a/calendar/lightning/content/imip-bar.js
+++ b/calendar/lightning/content/imip-bar.js
@@ -114,17 +114,17 @@ var ltnImipBar = {
     },
 
     /**
      * Resets all buttons and its menuitems, all buttons are hidden thereafter
      */
     resetButtons: function ltnResetImipButtons() {
         let buttons = ltnImipBar.getButtons();
         buttons.forEach(hideElement);
-        buttons.forEach(function(aButton) ltnImipBar.getMenuItems(aButton).forEach(showElement));
+        buttons.forEach(aButton => ltnImipBar.getMenuItems(aButton).forEach(showElement));
     },
 
     /**
      * Provides a list of all available buttons
      */
     getButtons: function ltnGetButtons() {
         let buttons = [];
         let nl = document.getElementById("imip-view-toolbar")
@@ -156,20 +156,20 @@ var ltnImipBar = {
     /**
      * Checks and converts button types based on available menuitems of the buttons
      * to avoid dropdowns which are empty or only replicating the default button action
      * Should be called once the buttons are set up
      */
     conformButtonType: function ltnConformButtonType() {
         // check only needed on visible and not simple buttons
         let buttons = ltnImipBar.getButtons()
-                                .filter(function(aElement) aElement.hasAttribute("type") && !aElement.hidden);
+                                .filter(aElement => aElement.hasAttribute("type") && !aElement.hidden);
         // change button if appropriate
         for (let button of buttons) {
-            let items = ltnImipBar.getMenuItems(button).filter(function(aItem) !aItem.hidden);
+            let items = ltnImipBar.getMenuItems(button).filter(aItem => !aItem.hidden);
             if (button.type == "menu" && items.length == 0) {
                 // hide non functional buttons
                 button.hidden = true;
             } else if (button.type == "menu-button") {
                 if (items.length == 0 ||
                     (items.length == 1 &&
                      button.hasAttribute("oncommand") &&
                      items[0].hasAttribute("oncommand") &&
@@ -201,19 +201,19 @@ var ltnImipBar = {
             ltnImipBar.actionFunc = actionFunc;
             ltnImipBar.foundItems = foundItems;
         }
 
         imipBar.setAttribute("label", data.label);
         // let's reset all buttons first
         ltnImipBar.resetButtons();
         // menu items are visible by default, let's hide what's not available
-        data.hideMenuItems.forEach(function(aElementId) hideElement(document.getElementById(aElementId)));
+        data.hideMenuItems.forEach(aElementId => hideElement(document.getElementById(aElementId)));
         // buttons are hidden by default, let's make required buttons visible
-        data.buttons.forEach(function(aElementId) showElement(document.getElementById(aElementId)));
+        data.buttons.forEach(aElementId => showElement(document.getElementById(aElementId)));
         // adjust button style if necessary
         ltnImipBar.conformButtonType();
         if (Preferences.get('calendar.itip.displayInvitationChanges', false)) {
             // display event modifications if any
             ltnImipBar.displayModifications();
         } else if (msgWindow && ltnImipBar.msgOverlay) {
             msgWindow.displayHTMLInMessagePane('', ltnImipBar.msgOverlay, false);
         }
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -75,20 +75,20 @@ var calendarTabType = {
         aState.title = ltnGetString("lightning", "tabTitleCalendar");
         aTabmail.openTab('calendar', aState);
       },
 
       onTitleChanged: function(aTab) {
         aTab.title = ltnGetString("lightning", "tabTitleCalendar");
       },
 
-      supportsCommand: function (aCommand, aTab) calendarController2.supportsCommand(aCommand),
-      isCommandEnabled: function (aCommand, aTab) calendarController2.isCommandEnabled(aCommand),
-      doCommand: function(aCommand, aTab) calendarController2.doCommand(aCommand),
-      onEvent: function(aEvent, aTab) calendarController2.onEvent(aEvent)
+      supportsCommand: (aCommand, aTab) => calendarController2.supportsCommand(aCommand),
+      isCommandEnabled: (aCommand, aTab) => calendarController2.isCommandEnabled(aCommand),
+      doCommand: (aCommand, aTab) => calendarController2.doCommand(aCommand),
+      onEvent: (aEvent, aTab) => calendarController2.onEvent(aEvent)
     },
 
     tasks: {
       type: "tasks",
       maxTabs: 1,
       openTab: function(aTab, aArgs) {
         aTab.title = aArgs["title"];
         if (!("background" in aArgs) || !aArgs["background"]) {
@@ -120,20 +120,20 @@ var calendarTabType = {
         aState.title = ltnGetString("lightning", "tabTitleTasks");
         aTabmail.openTab('tasks', aState);
       },
 
       onTitleChanged: function(aTab) {
         aTab.title = ltnGetString("lightning", "tabTitleTasks");
       },
 
-      supportsCommand: function (aCommand, aTab) calendarController2.supportsCommand(aCommand),
-      isCommandEnabled: function (aCommand, aTab) calendarController2.isCommandEnabled(aCommand),
-      doCommand: function(aCommand, aTab) calendarController2.doCommand(aCommand),
-      onEvent: function(aEvent, aTab) calendarController2.onEvent(aEvent)
+      supportsCommand: (aCommand, aTab) => calendarController2.supportsCommand(aCommand),
+      isCommandEnabled: (aCommand, aTab) => calendarController2.isCommandEnabled(aCommand),
+      doCommand: (aCommand, aTab) => calendarController2.doCommand(aCommand),
+      onEvent: (aEvent, aTab) => calendarController2.onEvent(aEvent)
     }
   },
 
   /* because calendar does some direct menu manipulation, we need to change
    *  to the mail mode to clean up after those hacks.
    */
   saveTabState: function(aTab) {
     ltnSwitch2Mail();
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -2068,17 +2068,17 @@ calDavCalendar.prototype = {
                 thisCalendar.completeCheckServerInfo(aChangeLogListener,
                                                      Components.results.NS_ERROR_FAILURE);
                 return;
             }
 
             let pcs = caldavXPath(multistatus, "/D:multistatus/D:response/D:propstat/D:prop/D:principal-collection-set/D:href/text()");
             let nsList = [];
             if (pcs) {
-                nsList = pcs.map(function(x) thisCalendar.ensureDecodedPath(x));
+                nsList = pcs.map(x => thisCalendar.ensureDecodedPath(x));
             }
 
             thisCalendar.checkPrincipalsNameSpace(nsList, aChangeLogListener);
         };
 
         this.sendHttpRequest(homeSet, queryXml, MIME_TEXT_XML, null, (channel) => {
             channel.setRequestHeader("Depth", "0", false);
             channel.requestMethod = "PROPFIND";
--- a/calendar/providers/composite/calCompositeCalendar.js
+++ b/calendar/providers/composite/calCompositeCalendar.js
@@ -95,18 +95,18 @@ calCompositeCalendar.prototype = {
         contractID: "@mozilla.org/calendar/calendar;1?type=composite",
         classDescription: "Composite Calendar Provider",
         interfaces: calCompositeCalendarInterfaces,
     }),
 
     //
     // calICalendarProvider interface
     //
-    get prefChromeOverlay() null,
-    get displayName() cal.calGetString("calendar", "compositeName"),
+    get prefChromeOverlay() { return null; },
+    get displayName() { return cal.calGetString("calendar", "compositeName"); },
 
     createCalendar: function comp_createCal() {
         throw NS_ERROR_NOT_IMPLEMENTED;
     },
 
     deleteCalendar: function comp_deleteCal(calendar, listener) {
         // You shouldn't be able to delete from the composite calendar.
         throw NS_ERROR_NOT_IMPLEMENTED;
--- a/calendar/providers/gdata/components/calGoogleCalendar.js
+++ b/calendar/providers/gdata/components/calGoogleCalendar.js
@@ -95,45 +95,45 @@ calGoogleCalendar.prototype = {
     ensureWritable: function() {
         // Check if calendar is readonly
         if (this.readOnly) {
             const cIE = Components.interfaces.calIErrors;
             throw new Components.Exception("", cIE.CAL_IS_READONLY);
         }
     },
 
-    get isDefaultCalendar() this.mCalendarName ? !this.mCalendarName.endsWith("@group.calendar.google.com") : false,
+    get isDefaultCalendar() { return this.mCalendarName ? !this.mCalendarName.endsWith("@group.calendar.google.com") : false; },
 
     /*
      * implement calICalendar
      */
-    get type() "gdata",
-    get providerID() "{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}",
-    get canRefresh() true,
+    get type() { return "gdata"; },
+    get providerID() { return "{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}"; },
+    get canRefresh() { return true; },
 
-    get id() this.mID,
+    get id() { return this.mID; },
     set id(val) {
         let setter = this.__proto__.__proto__.__lookupSetter__("id");
         val = setter.call(this, val);
 
         if (this.id && this.uri) {
             this.ensureSession();
         }
         return val;
     },
 
-    get uri() this.mUri,
+    get uri() { return this.mUri; },
     set uri(aUri) {
         const protocols = ["http", "https", "webcal", "webcals"];
         this.mUri = aUri;
         if (aUri && aUri.schemeIs("googleapi")) {
             // new format:  googleapi://session-id/?calendar=calhash@group.calendar.google.com&tasks=taskhash
             let [fullUser, path] = aUri.path.substr(2).split("/", 2);
             let parameters = new Map(path.substr(1).split("&").filter(Boolean)
-                             .map(function(x) x.split("=", 2).map(decodeURIComponent)));
+                             .map(function(x) { return x.split("=", 2).map(decodeURIComponent); }));
 
             if (parameters.size == 0) {
                 this.mCalendarName = fullUser;
                 this.mTasklistName = this.isDefaultCalendar ? "@default" : null;
             } else {
                 this.mCalendarName = parameters.get("calendar");
                 this.mTasklistName = parameters.get("tasks");
             }
@@ -334,17 +334,17 @@ calGoogleCalendar.prototype = {
     },
 
     addItemOrUseCache: calendarShim.addItemOrUseCache,
     adoptItemOrUseCache: calendarShim.adoptItemOrUseCache,
     modifyItemOrUseCache: calendarShim.modifyItemOrUseCache,
     deleteItemOrUseCache: calendarShim.deleteItemOrUseCache,
     notifyPureOperationComplete: calendarShim.notifyPureOperationComplete,
 
-    addItem: function(aItem, aListener) this.adoptItem(aItem.clone(), aListener),
+    addItem: function(aItem, aListener) { return this.adoptItem(aItem.clone(), aListener); },
     adoptItem: function(aItem, aListener) {
         function stackContains(part, max) {
             if (max === undefined) max = 8;
             let stack = Components.stack.caller;
             while (stack && --max) {
                 if (stack.filename && stack.filename.endsWith(part)) {
                     return true;
                 }
@@ -598,17 +598,17 @@ calGoogleCalendar.prototype = {
 
     refresh: function() {
         this.mObservers.notify("onLoad", [this]);
     },
 
     /**
      * Implement calIChangeLog
      */
-    get offlineStorage() this.mOfflineStorage,
+    get offlineStorage() { return this.mOfflineStorage; },
     set offlineStorage(val) {
         this.mOfflineStorage = val;
         let cacheVersion = this.getProperty("cache.version");
         let resetPromise;
         if (cacheVersion && cacheVersion != this.CACHE_DB_VERSION) {
             cal.LOG("[calGoogleCalendar] Migrating cache from " +
                     cacheVersion + " to " + this.CACHE_DB_VERSION);
             this.resetSync()
@@ -675,17 +675,17 @@ calGoogleCalendar.prototype = {
         let calendarPromise = Promise.resolve();
         if (this.mCalendarName && this.checkThrottle("calendarList")) {
             let calendarRequest = new calGoogleRequest();
             calendarRequest.calendar = this;
             calendarRequest.type = calendarRequest.GET;
             calendarRequest.uri = this.createUsersURI("calendarList", this.mCalendarName)
             calendarPromise = this.session.asyncItemRequest(calendarRequest).then(function(aData) {
                 if (aData.defaultReminders) {
-                    this.defaultReminders = aData.defaultReminders.map(function(x) JSONToAlarm(x, true));
+                    this.defaultReminders = aData.defaultReminders.map(function(x) { return JSONToAlarm(x, true); });
                 } else {
                     this.defaultReminders = [];
                 }
 
                 for each (let k in ["accessRole", "backgroundColor", "description",
                                     "foregroundColor", "location", "primary",
                                     "summary", "summaryOverride", "timeZone"]) {
                     this.setProperty("settings." + k, aData[k]);
@@ -775,12 +775,12 @@ calGoogleCalendar.prototype = {
         }.bind(this));
     },
 
     /**
      * Implement calISchedulingSupport. Most is taken care of by the base
      * provider, but we want to advertise that we will always take care of
      * notifications.
      */
-    canNotify: function(aMethod, aItem) true
+    canNotify: function(aMethod, aItem) { return true; }
 };
 
 var NSGetFactory = XPCOMUtils.generateNSGetFactory([calGoogleCalendar]);
--- a/calendar/providers/gdata/content/gdata-calendar-creation.js
+++ b/calendar/providers/gdata/content/gdata-calendar-creation.js
@@ -105,17 +105,17 @@ CuImport("resource://gre/modules/Promise
             let sessionGroup = document.getElementById("gdata-session-group");
             let sessionName = document.getElementById("gdata-session-name");
             let sessionNameIsValid = document.getAnonymousElementByAttribute(sessionName, "anonid", "input").validity.valid;
             // TODO for some reason the validity doesn't work on windows. Here is a hack:
             sessionNameIsValid = !!sessionName.value.match(/^[^\/]+@[^\/]+\.[^\/]+$/);
             wizard.canAdvance = sessionGroup.value || (sessionName.value && sessionNameIsValid);
         } else if (currentPageId == "gdata-calendars") {
             let calendarList = document.getElementById("calendar-list");
-            let calendars = calendarList.selectedCalendars.filter(function(x) !x.getProperty("disabled") && !x.readOnly);
+            let calendars = calendarList.selectedCalendars.filter(function(x) { return !x.getProperty("disabled") && !x.readOnly; });
             wizard.canAdvance = !!calendars.length;
         } else {
             protofunc();
         }
     });
 
     this.gdataSessionShow = trycatch(function() {
         let sessionMgr = getGoogleSessionManager();
@@ -210,17 +210,17 @@ CuImport("resource://gre/modules/Promise
             calendarListWidget.calendars = calendars;
         }.bind(this), function(e) {
             Components.utils.reportError(e);
         }.bind(this));
     });
 
     this.gdataCalendarsAdvance = trycatch(function() {
         let calendarList = document.getElementById("calendar-list");
-        let calendars = calendarList.selectedCalendars.filter(function(x) !x.getProperty("disabled") && !x.readOnly);
+        let calendars = calendarList.selectedCalendars.filter(function(x) { return !x.getProperty("disabled") && !x.readOnly; });
         let calMgr = cal.getCalendarManager();
 
         if (Services.vc.compare(Services.appinfo.platformVersion, "9.0") < 0) {
             // This version didn't allow creating calendars with an id set, we
             // will have to hack it in.
             calendars.forEach(gdataRegisterCalendar);
         } else {
             calendars.forEach(calMgr.registerCalendar, calMgr);
--- a/calendar/providers/gdata/content/gdata-calendar-event-dialog.js
+++ b/calendar/providers/gdata/content/gdata-calendar-event-dialog.js
@@ -179,17 +179,17 @@ Components.utils.import("resource://gdat
         let calendar = getCurrentCalendar().getProperty("cache.uncachedCalendar");
         let unwrappedCal = calendar && calendar.wrappedJSObject;
         let defaultReminders = unwrappedCal.defaultReminders ? unwrappedCal.defaultReminders.concat([]) : [];
         defaultItem.reminders = defaultReminders;
 
         let rv = null;
         let usesDefault;
         if (reminders.length) {
-            usesDefault = reminders.every(function(x) x.hasProperty("X-DEFAULT-ALARM"));
+            usesDefault = reminders.every(function(x) { return x.hasProperty("X-DEFAULT-ALARM"); });
         } else {
             usesDefault = window.calendarItem.getProperty("X-DEFAULT-ALARM") == "TRUE";
         }
 
         if (calendar.type == "gdata" && (window.mode == "new" || usesDefault)) {
             // If all reminders are default reminders, then select the menuitem.
             reminderList.value = "default";
 
--- a/calendar/providers/gdata/content/gdata-calendar-properties.js
+++ b/calendar/providers/gdata/content/gdata-calendar-properties.js
@@ -15,17 +15,17 @@
             // Disable setting read-only if the calendar is readonly anyway
             document.getElementById("read-only").disabled = isDisabled || (isEventsCalendar && isReader);
 
             // Don't allow setting refresh interval to 30 minutes or less
             let refInterval = document.getElementById("calendar-refreshInterval-menupopup");
             Array.slice(refInterval.childNodes).filter(function(n) {
                 let nv = parseInt(n.getAttribute("value"), 10);
                 return nv < 30 && nv != 0;
-            }).forEach(function(n) refInterval.removeChild(n));
+            }).forEach(function(n) { refInterval.removeChild(n); });
 
             // Old Lightning doesn't hide the cache label
             let oldCacheLabel = document.getElementById("cache");
             if (oldCacheLabel) {
                 oldCacheLabel.setAttribute("hidden", "true");
             }
         }
         return rv;
--- a/calendar/providers/gdata/modules/OAuth2.jsm
+++ b/calendar/providers/gdata/modules/OAuth2.jsm
@@ -113,17 +113,17 @@ OAuth2.prototype = {
         if (this.scope) {
             params.push(["scope", this.scope]);
         }
 
         // Add extra parameters, if they exist
         Array.prototype.push.apply(params, this.extraAuthParams);
 
         // Now map the parameters to a string
-        params = params.map(function([k,v]) k + "=" + encodeURIComponent(v)).join("&");
+        params = params.map(function([k, v]) { return k + "=" + encodeURIComponent(v); }).join("&");
 
         this._browserRequest = {
             account: this,
             url: this.authURI + "?" + params,
             description: this.requestWindowDescription,
             _active: true,
             iconURI: "",
             cancelled: function() {
--- a/calendar/providers/gdata/modules/gdataRequest.jsm
+++ b/calendar/providers/gdata/modules/gdataRequest.jsm
@@ -121,17 +121,17 @@ calGoogleRequest.prototype = {
         }
     },
 
     /**
      * attribute type
      * The type of this reqest. Must be one of
      * GET, ADD, MODIFY, DELETE
      */
-    get type() this.method,
+    get type() { return this.method; },
 
     set type(v) {
         let valid = [this.GET, this.ADD, this.MODIFY, this.PATCH, this.DELETE];
         if (valid.indexOf(v) < 0) {
             throw new Components.Exception("Invalid request type: " + v,
                                             Components.results.NS_ERROR_ILLEGAL_VALUE);
         }
         return (this.method = v);
--- a/calendar/providers/gdata/modules/gdataSession.jsm
+++ b/calendar/providers/gdata/modules/gdataSession.jsm
@@ -47,17 +47,17 @@ var calGoogleSessionManager = {
 
         if (aCalendar.type != "gdata") {
             return;
         }
 
         if (uri.schemeIs("googleapi")) {
             let [fullUser, path] = uri.path.substr(2).split("/", 2);
             id = fullUser || cal.getUUID();
-        } else if (host == "www.google.com" && uri.path.startsWith("/calendar/feeds") && protocols.some(function(s) uri.schemeIs(s))) {
+        } else if (host == "www.google.com" && uri.path.startsWith("/calendar/feeds") && protocols.some(function(s) { return uri.schemeIs(s); })) {
             let googleCalendarName = aCalendar.getProperty("googleCalendarName");
             let googleUser = Preferences.get("calendar.google.calPrefs." + googleCalendarName  + ".googleUser");
             id = googleUser || googleCalendarName || cal.getUUID();
         }
 
         return id ? this.getSessionById(id, aCreate) : null;
     },
 
@@ -68,17 +68,17 @@ var calGoogleSessionManager = {
         } else if (aCreate) {
             cal.LOG("[calGoogleSessionManager] Creating session " + aSessionId);
             gdataSessionMap.set(aSessionId, new calGoogleSession(aSessionId));
         }
 
         return gdataSessionMap.get(aSessionId);
     }
 };
-function getGoogleSessionManager() calGoogleSessionManager;
+function getGoogleSessionManager() { return calGoogleSessionManager; }
 
 /**
  * calGoogleSession
  * This Implements a Session object to communicate with google
  *
  * @constructor
  * @class
  * @param aId       The ID for the new session.
@@ -93,17 +93,17 @@ function calGoogleSession(aId) {
     cal.getFreeBusyService().addProvider(this);
 }
 
 calGoogleSession.prototype = {
     mId: null,
     mSessionID: null,
     mLoginPromise: null,
 
-    get id() this.mId,
+    get id() { return this.mId; },
 
     notifyQuotaExceeded: function() {
         let now = new Date();
         let tt = (now - this.mLastNotified);
         if (!this.mLastNotified || (now - this.mLastNotified) > NOTIFY_TIMEOUT) {
             this.mLastNotified = now;
             let title = getProviderString("extensions.{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}.name");
             let quotaString = getProviderString("quotaExceeded", this.id);
@@ -190,19 +190,19 @@ calGoogleSession.prototype = {
             if (!found || found.capability != nIPM.DENY_ACTION) {
                 Services.perms.remove("google.com", "cookie");
                 let uri = Services.io.newURI("http://google.com", null, null);
                 Services.perms.add(uri, "cookie", nIPM.ALLOW_ACTION, nIPM.EXPIRE_SESSION);
             }
         }
     },
 
-    get accessToken() this.oauth.accessToken,
-    get refreshToken() this.oauth.refreshToken,
-    set refreshToken(val) this.oauth.refreshToken = val,
+    get accessToken() { return this.oauth.accessToken; },
+    get refreshToken() { return this.oauth.refreshToken; },
+    set refreshToken(val) { this.oauth.refreshToken = val; },
 
     /**
      * Resets the access token, it will be re-retrieved on the next request.
      */
     invalidate: function cGS_invalidate() {
         cal.LOG("[calGoogleSession] Invalidating session, will reauthenticate on next request");
         this.oauth.accessToken = null;
     },
--- a/calendar/providers/gdata/modules/gdataUtils.jsm
+++ b/calendar/providers/gdata/modules/gdataUtils.jsm
@@ -79,17 +79,17 @@ function migrateItemMetadata(aOfflineSto
     if (aNewItem.status == "CANCELLED") {
         deleteItemMetadata(aOfflineStorage, aNewItem);
     } else {
         saveItemMetadata(aOfflineStorage, aNewItem.hashId, aMetadata);
     }
 
     // If an exception was turned into an EXDATE, we need to clear its metadata
     if (aOldItem.recurrenceInfo && aNewItem.recurrenceInfo) {
-        let newExIds = new Set(aNewItem.recurrenceInfo.getExceptionIds({}).map(function(x) x.icalString));
+        let newExIds = new Set(aNewItem.recurrenceInfo.getExceptionIds({}).map(function(x) { return x.icalString; }));
         for each (let exId in aOldItem.recurrenceInfo.getExceptionIds({})) {
             if (!newExIds.has(exId.icalString)) {
                 let ex = aOldItem.recurrenceInfo.getExceptionFor(exId);
                 deleteItemMetadata(aOfflineStorage, ex);
             }
         }
     }
 }
@@ -934,17 +934,17 @@ ItemSaver.prototype = {
             if (!aData.items || !aData.items.length) {
                 cal.LOG("[calGoogleCalendar] No events have been changed on " + this.calendar.name);
                 return;
             } else {
                 cal.LOG("[calGoogleCalendar] Parsing " + aData.items.length + " received events");
             }
 
             let exceptionItems = [];
-            let defaultReminders = (aData.defaultReminders || []).map(function(x) JSONToAlarm(x, true));
+            let defaultReminders = (aData.defaultReminders || []).map(function(x) { return JSONToAlarm(x, true); });
 
             let tzs = cal.getTimezoneService();
             let defaultTimezone = (aData.timeZone ? tzs.getTimezone(aData.timeZone) :
                                     cal.calendarDefaultTimezone());
 
             // In the first pass, we go through the data and sort into master items and
             // exception items, as the master item might be after the exception in the
             // stream.
@@ -1237,12 +1237,12 @@ function monkeyPatch(obj, x, func) {
 function spinEventLoop() {
     let diff = new Date() - spinEventLoop.lastSpin;
     if (diff < Preferences.get("calendar.threading.latency", 250)) {
         return Promise.resolve(false);
     }
     spinEventLoop.lastSpin = new Date();
 
     let deferred = PromiseUtils.defer();
-    Services.tm.currentThread.dispatch({ run: function() deferred.resolve(true) }, 0);
+    Services.tm.currentThread.dispatch({ run: function() { return deferred.resolve(true); } }, 0);
     return deferred.promise;
 }
 spinEventLoop.lastSpin = new Date();
--- a/calendar/providers/gdata/modules/shim/Calendar.jsm
+++ b/calendar/providers/gdata/modules/shim/Calendar.jsm
@@ -254,16 +254,16 @@ function promisifyCalendar(aCalendar) {
                     }.bind(this);
                 default:
                     return target[name];
             }
         }
     };
     return {
         // Backwards compat, we can use |new Proxy(aCalendar, promisifyProxyHandler);| in the future.
-        adoptItem: function(aItem) promisifyProxyHandler.get(aCalendar, "adoptItem").apply(this, arguments),
-        addItem: function(aItem) promisifyProxyHandler.get(aCalendar, "addItem").apply(this, arguments),
-        modifyItem: function(aItem) promisifyProxyHandler.get(aCalendar, "modifyItem").apply(this, arguments),
-        deleteItem: function(aItem) promisifyProxyHandler.get(aCalendar, "deleteItem").apply(this, arguments),
-        getItem: function(aItem) promisifyProxyHandler.get(aCalendar, "getItem").apply(this, arguments),
-        getItems: function(aItems) promisifyProxyHandler.get(aCalendar, "getItems").apply(this, arguments),
+        adoptItem: function(aItem) { return promisifyProxyHandler.get(aCalendar, "adoptItem").apply(this, arguments); },
+        addItem: function(aItem) { return promisifyProxyHandler.get(aCalendar, "addItem").apply(this, arguments); },
+        modifyItem: function(aItem) { return promisifyProxyHandler.get(aCalendar, "modifyItem").apply(this, arguments); },
+        deleteItem: function(aItem) { return promisifyProxyHandler.get(aCalendar, "deleteItem").apply(this, arguments); },
+        getItem: function(aItem) { return promisifyProxyHandler.get(aCalendar, "getItem").apply(this, arguments); },
+        getItems: function(aItems) { return promisifyProxyHandler.get(aCalendar, "getItems").apply(this, arguments); },
     };
 }
--- a/calendar/providers/gdata/modules/shim/Http.jsm
+++ b/calendar/providers/gdata/modules/shim/Http.jsm
@@ -1,18 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var EXPORTED_SYMBOLS = ["percentEncode", "httpRequest"];
 
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
-function percentEncode(aString)
-  encodeURIComponent(aString).replace(/[!'()]/g, escape).replace(/\*/g, "%2A");
+function percentEncode(aString) {
+  return encodeURIComponent(aString).replace(/[!'()]/g, escape).replace(/\*/g, "%2A");
+}
 
 function httpRequest(aUrl, aOptions) {
   let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
               .createInstance(Ci.nsIXMLHttpRequest);
   xhr.mozBackgroundRequest = true; // no error dialogs
   xhr.open(aOptions.method || (aOptions.postData ? "POST" : "GET"), aUrl);
   xhr.channel.loadFlags = Ci.nsIChannel.LOAD_ANONYMOUS | // don't send cookies
                           Ci.nsIChannel.LOAD_BYPASS_CACHE |
@@ -61,17 +62,17 @@ function httpRequest(aUrl, aOptions) {
     });
   }
 
   // Handle adding postData as defined above.
   let POSTData = aOptions.postData || "";
   if (Array.isArray(POSTData)) {
     xhr.setRequestHeader("Content-Type",
                          "application/x-www-form-urlencoded; charset=utf-8");
-    POSTData = POSTData.map(function(p) p[0] + "=" + percentEncode(p[1]))
+    POSTData = POSTData.map(function(p) { return p[0] + "=" + percentEncode(p[1]); })
                        .join("&");
   }
 
   if (aOptions.logger) {
     aOptions.logger.log("sending request to " + aUrl + " (POSTData = " +
                         POSTData + ")");
   }
   xhr.send(POSTData);
--- a/calendar/providers/gdata/modules/shim/Loader.jsm
+++ b/calendar/providers/gdata/modules/shim/Loader.jsm
@@ -140,29 +140,29 @@ function Map(values) {
     this.data = Object.create(null);
     if (values) {
         for each (let [k,v] in values) {
             this.data[k] = v;
         }
     }
 }
 Map.prototype = {
-    has: function(k) k in this.data,
-    set: function(k, v) this.data[k] = v,
-    get: function(k) this.data[k],
-    delete: function(k) delete this.data[k],
-    get size() Object.keys(this.data).length,
+    has: function(k) { return k in this.data; },
+    set: function(k, v) { return this.data[k] = v; },
+    get: function(k) { return this.data[k]; },
+    delete: function(k) { return delete this.data[k]; },
+    get size() { return Object.keys(this.data).length; },
     forEach: function(cb) {
         for (let k in this.data) {
             cb(this.data[k], k, this);
         }
     },
 
-    toSource: function() Object.prototype.toSource.call(this.data),
-    __iterator__: function() new Iterator(this.data)
+    toSource: function() { return Object.prototype.toSource.call(this.data); },
+    __iterator__: function() { return new Iterator(this.data); }
 };
 
 /**
  * Not a particularly fast implementation of Set, but since our keys can be
  * objects we can't just use normal js objects.
  */
 function Set(values) {
     this.data = [];
@@ -173,35 +173,35 @@ function Set(values) {
 Set.prototype = {
     has: function(v) {
         for each (let dv in this.data) {
             if (v == dv) return true;
         }
         return false;
     },
 
-    get size() this.data.length,
-    add: function(v) this.has(v) ? null : this.data.push(v),
-    clear: function() this.data = [],
+    get size() { return this.data.length; },
+    add: function(v) { return this.has(v) ? null : this.data.push(v); },
+    clear: function() { return this.data = []; },
     delete: function(v) {
         for (let i = 0; i < this.data.length; i++) {
             if (this.data[i] == v) {
                 this.data.splice(i, 1);
                 return;
             }
         }
     },
 
     forEach: function(cb) {
         for each (let v in this.data) {
             cb(v, v, this);
         }
     },
 
-    toSource: function() this.data.toSource(),
+    toSource: function() { return this.data.toSource(); },
     __iterator__: function() {
         for each (let v in this.data) {
             yield v;
         }
     }
 };
 
 if (!cal.hashColor) {
@@ -219,12 +219,12 @@ if (!cal.hashColor) {
                               "#33CC00", "#00CCCC", "#3366FF", "#6633FF", "#CC33CC",
                               "#666666", "#990000", "#CC6600", "#CC9933", "#999900",
                               "#009900", "#339999", "#3333FF", "#6600CC", "#993399",
                               "#333333", "#660000", "#993300", "#996633", "#666600",
                               "#006600", "#336666", "#000099", "#333399", "#663366",
                               "#000000", "#330000", "#663300", "#663333", "#333300",
                               "#003300", "#003333", "#000066", "#330099", "#330033"];
 
-        let sum = Array.map(str || " ", function(e) e.charCodeAt(0)).reduce(function(a,b) a + b);
+        let sum = Array.map(str || " ", function(e) { return e.charCodeAt(0); }).reduce(function(a, b) { return a + b; });
         return colorPalette[sum % colorPalette.length];
     }
 }
--- a/calendar/providers/gdata/modules/shim/Preferences.jsm
+++ b/calendar/providers/gdata/modules/shim/Preferences.jsm
@@ -2,12 +2,12 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var EXPORTED_SYMBOLS = ["Preferences"];
 
 Components.utils.import("resource://calendar/modules/calUtils.jsm");
 
 var Preferences = {
-    has: function(k) !!cal.getPrefSafe(k),
-    get: function(k, v) cal.getPrefSafe(k, v),
-    set: function(k, v) cal.setPref(k, v)
+    has: function(k) { return !!cal.getPrefSafe(k); },
+    get: function(k, v) { return cal.getPrefSafe(k, v); },
+    set: function(k, v) { return cal.setPref(k, v); }
 };
--- a/calendar/providers/gdata/modules/shim/Promise.jsm
+++ b/calendar/providers/gdata/modules/shim/Promise.jsm
@@ -144,13 +144,13 @@ Promise.prototype = {
 Promise.defer = function() {
     return new Deferred();
 };
 
 Promise.resolve = function(aValue) {
     if (aValue instanceof Promise) {
         return aValue;
     }
-    return new Promise(function(aResolve) aResolve(aValue));
+    return new Promise(function(aResolve) { return aResolve(aValue); });
 };
 Promise.reject = function(aReason) {
-    return new Promise(function(_, aReject) aReject(aReason));
+    return new Promise(function(_, aReject) { return aReject(aReason); });
 }
--- a/calendar/providers/gdata/modules/shim/PromiseExtras.jsm
+++ b/calendar/providers/gdata/modules/shim/PromiseExtras.jsm
@@ -38,17 +38,17 @@ if (typeof Promise.all == "function") {
     if (!countdown) {
       return Promise.resolve(resolutionValues);
     }
 
     let deferred = PromiseUtils.defer();
     for (let i = 0; i < values.length; i++) {
       let index = i;
       let value = values[i];
-      let resolver = function(val) checkForCompletion(val, index);
+      let resolver = function(val) { return checkForCompletion(val, index); };
 
       if (value && typeof(value.then) == "function") {
         value.then(resolver, deferred.reject);
       } else {
         // Given value is not a promise, forward it as a resolution value.
         resolver(value);
       }
     }
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -1522,17 +1522,17 @@ upgrade.v22 = function upgrade_v22(db, v
         });
         migrateToIcalString(tbl, "cal_attendees", "translateAttendee",
                             ["attendee_id", "common_name", "rsvp", "role",
                              "status", "type", "is_organizer", "properties"], db);
 
         // Update recurrence table to using icalString directly
         createFunction(db, "translateRecurrence", 17, {
             onFunctionCall: function translateRecurrence(storArgs) {
-                function parseInt10(x) parseInt(x, 10);
+                function parseInt10(x) { return parseInt(x, 10); }
                 try {
                     let [aIndex, aType, aIsNegative, aDates, aCount,
                          aEndDate, aInterval, aSecond, aMinute, aHour,
                          aDay, aMonthday, aYearday, aWeekno, aMonth,
                          aSetPos, aTmpFlags] = mapStorageArgs(storArgs);
 
                     let ritem;
                     if (aType == "x-date") {
--- a/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/calendar/providers/wcap/calWcapCalendarItems.js
@@ -138,17 +138,17 @@ calWcapCalendar.prototype.encodeRecurren
     // check with store(with no uid) upon adoptItem() which behaves strange
     // if rchange=0 is set!
 };
 
 calWcapCalendar.prototype.getAlarmParams =
 function calWcapCalendar_getAlarmParams(item) {
     let params = null;
     // xxx TODO ALARMSUPPORT check if WCAP supports multiple alarms
-    let alarms = item.getAlarms({}).filter(function(x) x.action == "EMAIL");
+    let alarms = item.getAlarms({}).filter(x => x.action == "EMAIL");
     let alarm = alarms.length > 0 && alarms[0];
 
     if (alarm) {
         let alarmStart = cal.alarms.calculateAlarmOffset(item, alarm);
         if (alarm.related == alarm.ALARM_RELATED_END) {
             // cs does not support explicit RELATED=END when
             // both start|entry and end|due are written
             let dur = item.duration;
--- a/calendar/resources/content/calendarCreation.js
+++ b/calendar/resources/content/calendarCreation.js
@@ -217,17 +217,17 @@ function parseUri(aUri) {
         uri = makeURL(aUri);
     } catch (ex) {
         return [errorConstants.INVALID_URI, null];
     }
 
     let calManager = cal.getCalendarManager();
     let cals = calManager.getCalendars({});
     let type = document.getElementById('calendar-type').selectedItem.value;
-    if (type != 'local' && cals.some(function (c) c.uri.spec == uri.spec)) {
+    if (type != 'local' && cals.some(c => c.uri.spec == uri.spec)) {
         // If the calendar is not local, we check if there is already a calendar
         // with the same uri spec. Storage calendars all have the same uri, so
         // we have to specialcase them.
         return [errorConstants.ALREADY_EXISTS, null];
     }
 
     return [errorConstants.SUCCESS, uri];
 }
--- a/calendar/test/mozmill/testLocalICS.js
+++ b/calendar/test/mozmill/testLocalICS.js
@@ -58,17 +58,17 @@ var testLocalICS = function () {
   event.type(titleTextBox, title);
   
   // set calendar
   let itemCalendar = new elementslib.ID(event.window.document, "item-calendar")
   event.select(itemCalendar, undefined, calendar);
   // HACK - Wait for the value to be selected. This is needed for platforms
   // like mac where selecting the menuitem is an asynchronous process, it might
   // be fixed in a later version of mozmill.
-  event.waitFor(function() itemCalendar.getNode().value == calendar);
+  event.waitFor(() => itemCalendar.getNode().value == calendar);
   
   // save
   event.click(new elementslib.ID(event.window.document, "button-save"));
   
   // assert presence in view
   let box = calUtils.getEventBoxPath(controller, "day", calUtils.EVENT_BOX, undefined, 1, hour)
     + '/{"tooltip":"itemTooltip","calendar":"' + calendar + '"}';
   controller.waitForElement(new elementslib.Lookup(controller.window.document, box));
--- a/calendar/test/unit/test_alarm.js
+++ b/calendar/test/unit/test_alarm.js
@@ -493,24 +493,24 @@ function test_serialize() {
     let alarm = cal.createAlarm();
     let srv = cal.getIcsService();
 
     throws(function() {
         alarm.icalComponent = srv.createIcalComponent("BARF");
     }, /0x80070057/ , "Invalid Argument");
 
     function addProp(k,v) { let p = srv.createIcalProperty(k); p.value = v; comp.addProperty(p) }
-    function addActionDisplay() addProp("ACTION", "DISPLAY");
-    function addActionEmail() addProp("ACTION", "EMAIL");
-    function addTrigger() addProp("TRIGGER", "-PT15M");
-    function addDescr() addProp("DESCRIPTION", "TEST");
-    function addDuration() addProp("DURATION", "-PT15M");
-    function addRepeat() addProp("REPEAT", "1");
-    function addAttendee() addProp("ATTENDEE", "mailto:horst");
-    function addAttachment() addProp("ATTACH", "data:yeah");
+    function addActionDisplay() { addProp("ACTION", "DISPLAY"); }
+    function addActionEmail() { addProp("ACTION", "EMAIL"); }
+    function addTrigger() { addProp("TRIGGER", "-PT15M"); }
+    function addDescr() { addProp("DESCRIPTION", "TEST"); }
+    function addDuration() { addProp("DURATION", "-PT15M"); }
+    function addRepeat() { addProp("REPEAT", "1"); }
+    function addAttendee() { addProp("ATTENDEE", "mailto:horst"); }
+    function addAttachment() { addProp("ATTACH", "data:yeah"); }
 
     // All is there, should not throw
     let comp = srv.createIcalComponent("VALARM");
     addActionDisplay(); addTrigger(); addDescr(); addDuration(); addRepeat();
     alarm.icalComponent = comp;
     alarm.toString();
 
     // Attachments and attendees
--- a/calendar/test/unit/test_alarmservice.js
+++ b/calendar/test/unit/test_alarmservice.js
@@ -4,17 +4,17 @@
 
 Components.utils.import("resource://calendar/modules/calUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 const EXPECT_NONE = 0;
 const EXPECT_FIRED = 1;
 const EXPECT_TIMER = 2;
 
-function do_check_xor(a, b) ok((a && !b) || (!a && b));
+function do_check_xor(a, b) { return ok((a && !b) || (!a && b)); }
 
 let alarmObserver = {
     service: null,
     firedMap: {},
     expectedMap: {},
     pendingOps: {},
 
     onAlarm: function obs_onAlarm(aItem, aAlarm) {
--- a/calendar/test/unit/test_calmgr.js
+++ b/calendar/test/unit/test_calmgr.js
@@ -39,24 +39,24 @@ function test_calobserver() {
     // First of all we need a local calendar to work on and some variables
     let calmgr = cal.getCalendarManager();
     let memory = calmgr.createCalendar("memory", Services.io.newURI("moz-memory-calendar://", null, null));
     let memory2 = calmgr.createCalendar("memory", Services.io.newURI("moz-memory-calendar://", null, null));
     let calcounter, allcounter;
 
     // These observers will end up counting calls which we will use later on
     let calobs = cal.createAdapter(Components.interfaces.calIObserver, {
-        onAddItem: function(itm) calcounter.addItem++,
-        onModifyItem: function(itm) calcounter.modifyItem++,
-        onDeleteItem: function(itm) calcounter.deleteItem++
+        onAddItem: itm => calcounter.addItem++,
+        onModifyItem: itm => calcounter.modifyItem++,
+        onDeleteItem: itm => calcounter.deleteItem++
     });
     let allobs = cal.createAdapter(Components.interfaces.calIObserver, {
-        onAddItem: function(itm) allcounter.addItem++,
-        onModifyItem: function(itm) allcounter.modifyItem++,
-        onDeleteItem: function(itm) allcounter.deleteItem++
+        onAddItem: itm => allcounter.addItem++,
+        onModifyItem: itm => allcounter.modifyItem++,
+        onDeleteItem: itm => allcounter.deleteItem++
     });
 
     // Set up counters and observers
     resetCounters();
     calmgr.registerCalendar(memory);
     calmgr.registerCalendar(memory2);
     calmgr.addCalendarObserver(allobs);
     memory.addObserver(calobs);
@@ -153,30 +153,30 @@ function test_registration() {
     checkRegistration(true, false, false);
     checkCalendarCount(0, 0, 1);
 
     // The calendar should now have an id
     notEqual(memory.id, null);
 
     // And be in the list of calendars
     equal(memory, calmgr.getCalendarById(memory.id));
-    ok(calmgr.getCalendars({}).some(function(x) x.id == memory.id));
+    ok(calmgr.getCalendars({}).some(x => x.id == memory.id));
 
     // Make it readonly and check if the observer caught it
     memory.setProperty("readOnly", true);
     equal(readOnly, true);
 
     // Now unregister it
     calmgr.unregisterCalendar(memory);
     checkRegistration(false, true, false);
     checkCalendarCount(0, 0, 0);
 
     // The calendar shouldn't be in the list of ids
     equal(calmgr.getCalendarById(memory.id), null);
-    ok(calmgr.getCalendars({}).every(function(x) x.id != memory.id));
+    ok(calmgr.getCalendars({}).every(x => x.id != memory.id));
 
     // And finally delete it
     calmgr.removeCalendar(memory, Ci.calICalendarManager.REMOVE_NO_UNREGISTER);
     checkRegistration(false, false, true);
     checkCalendarCount(0, 0, 0);
 
     // Now remove the observer again
     calmgr.removeObserver(mgrobs);
--- a/calendar/test/unit/test_deleted_items.js
+++ b/calendar/test/unit/test_deleted_items.js
@@ -38,68 +38,68 @@ add_task(function test_deleted_items() {
     let delmgr = Components.classes["@mozilla.org/calendar/deleted-items-manager;1"]
                            .getService(Components.interfaces.calIDeletedItems);
     // No items have been deleted, retrieving one should return null.
     equal(delmgr.getDeletedDate("random"), null);
     equal(delmgr.getDeletedDate("random", "random"), null);
 
     // Make sure the cache is initially flushed and that this doesn't throw an
     // error.
-    yield check_delmgr_call(function() delmgr.flush());
+    yield check_delmgr_call(() => delmgr.flush());
 
     let memory = calmgr.createCalendar("memory", Services.io.newURI("moz-storage-calendar://", null, null));
     calmgr.registerCalendar(memory);
 
     let item = cal.createEvent();
     item.id = "test-item-1";
     item.startDate = cal.now();
     item.endDate = cal.now();
 
     // Add the item, it still shouldn't be in the deleted database.
-    yield check_delmgr_call(function() memory.addItem(item, null));
+    yield check_delmgr_call(() => memory.addItem(item, null));
     equal(delmgr.getDeletedDate(item.id), null);
     equal(delmgr.getDeletedDate(item.id, memory.id), null);
 
     // We need to stop time so we have something to compare with.
     let referenceDate = cal.createDateTime("20120726T112045"); referenceDate.timezone = cal.calendarDefaultTimezone();
     let futureDate = cal.createDateTime("20380101T000000");  futureDate.timezone = cal.calendarDefaultTimezone();
     let useFutureDate = false;
     let oldNowFunction = cal.now;
     cal.now = function test_specific_now() {
         return (useFutureDate ? futureDate : referenceDate).clone();
     }
 
     // Deleting an item should trigger it being marked for deletion.
-    yield check_delmgr_call(function() memory.deleteItem(item, null));
+    yield check_delmgr_call(() => memory.deleteItem(item, null));
 
     // Now check if it was deleted at our reference date.
     let deltime = delmgr.getDeletedDate(item.id);
     notEqual(deltime, null);
     equal(deltime.compare(referenceDate), 0);
 
     // The same with the calendar.
     deltime = delmgr.getDeletedDate(item.id, memory.id);
     notEqual(deltime, null);
     equal(deltime.compare(referenceDate), 0);
 
     // Item should not be found in other calendars.
     equal(delmgr.getDeletedDate(item.id, "random"), null);
 
     // Check if flushing works, we need to travel time for that.
     useFutureDate = true;
-    yield check_delmgr_call(function() delmgr.flush());
+    yield check_delmgr_call(() => delmgr.flush());
     equal(delmgr.getDeletedDate(item.id), null);
     equal(delmgr.getDeletedDate(item.id, memory.id), null);
 
     // Start over with our past time.
     useFutureDate = false;
 
     // Add, delete, add. Item should no longer be deleted.
-    yield check_delmgr_call(function() memory.addItem(item, null));
+    yield check_delmgr_call(() => memory.addItem(item, null));
     equal(delmgr.getDeletedDate(item.id), null);
-    yield check_delmgr_call(function() memory.deleteItem(item, null));
+    yield check_delmgr_call(() => memory.deleteItem(item, null));
     equal(delmgr.getDeletedDate(item.id).compare(referenceDate), 0);
-    yield check_delmgr_call(function() memory.addItem(item, null));
+    yield check_delmgr_call(() => memory.addItem(item, null));
     equal(delmgr.getDeletedDate(item.id), null);
 
     // Revert now function, in case more tests are written.
     cal.now = oldNowFunction;
 });
--- a/calendar/test/unit/test_gdata_provider.js
+++ b/calendar/test/unit/test_gdata_provider.js
@@ -79,17 +79,17 @@ function GDataServer(calendarId, tasksId
             succ();
         }
     };
 }
 
 GDataServer.prototype = {
     items: null,
 
-    get baseUri() "http://localhost:" + this.server.identity.primaryPort + "/",
+    get baseUri() { return "http://localhost:" + this.server.identity.primaryPort + "/"; },
 
     start: function() {
         this.server.start(-1);
         do_register_cleanup(() => this.server.stop(() => {}));
     },
 
     resetClient: function(client) {
         this.resetRequest();
--- a/calendar/test/unit/test_hashedarray.js
+++ b/calendar/test/unit/test_hashedarray.js
@@ -65,17 +65,17 @@ function checkConsistancy(har, testItems
 
 /**
  * Useful for debugging, in case this test fails. Dumps the array showing the
  * title identifications.
  *
  * @param ar        The array to dump
  */
 function dumpArray(ar) {
-    dump("ARR: " + ar.map(function(e) e.title).toSource() + "\n");
+    dump("ARR: " + ar.map(e => e.title).toSource() + "\n");
 }
 
 /**
  * Man, this function is really hard to keep general enough, I'm almost tempted
  * to duplicate the code. It checks if the remove and modify operations work for
  * the given hashed array.
  *
  * @param har               The Hashed Array
@@ -84,17 +84,17 @@ function dumpArray(ar) {
  *                            operation, but before checking consistancy.
  * @param itemAccessor      (optional) The function to access the item for an
  *                            array element.
  * @param itemCreator       (optional) Function to create a new item for the
  *                            array.
  */
 function testRemoveModify(har, testItems, postprocessFunc, itemAccessor, itemCreator) {
     postprocessFunc = postprocessFunc || function(a, b) { return [a,b]; };
-    itemCreator = itemCreator || function(title) hashedCreateItem(title);
+    itemCreator = itemCreator || (title => hashedCreateItem(title));
     itemAccessor = itemAccessor || function(o) { return o; }
 
     // Now, delete the second item and check again
     har.removeById(itemAccessor(testItems[1]).hashId);
     testItems.splice(1, 1);
     [har, testItems] = postprocessFunc(har, testItems);
 
     checkConsistancy(har, testItems, itemAccessor);
@@ -169,17 +169,17 @@ function test_array_sorted() {
     testRemoveModify(har, testItemsSorted, sortedPostProcess);
 }
 
 /**
  * Tests cal.SortedHashedArray with a custom hashAccessor.
  */
 function test_hashAccessor() {
     let har, testItems, testItemsSorted;
-    let comptor = function(a,b) titleComptor(a.item, b.item);
+    let comptor = (a, b) => titleComptor(a.item, b.item);
 
     har = new cal.SortedHashedArray(comptor);
     har.hashAccessor = function(obj) {
         return obj.item.hashId;
     };
 
     function itemAccessor(obj) {
         if (!obj) do_throw("WTF?");
--- a/calendar/test/unit/test_items.js
+++ b/calendar/test/unit/test_items.js
@@ -20,18 +20,18 @@ function really_run_test() {
     test_attachment();
     test_lastack();
     test_categories();
     test_alarm();
 }
 
 function test_aclmanager() {
     let mockCalendar = {
-        get superCalendar() this,
-        get aclManager() this,
+        get superCalendar() { return this; },
+        get aclManager() { return this; },
 
         getItemEntry: function(item) {
             if (item.id == "withentry") {
                 return itemEntry;
             }
             return null;
         },
     };
--- a/calendar/test/unit/test_recur.js
+++ b/calendar/test/unit/test_recur.js
@@ -33,17 +33,17 @@ function test_rules() {
         // Get recurrence dates
         let start = createDate(1990, 0, 1);
         let end = createDate(2020, 0, 1);
         let recdates = event.recurrenceInfo.getOccurrenceDates(start, end, 0, {});
         let occurrences = event.recurrenceInfo.getOccurrences(start, end, 0, {});
 
         // Check number of items
         dump("Expected " + expected.length + " occurrences\n");
-        dump("Got: " + recdates.map(function(x) x.toString()) + "\n");
+        dump("Got: " + recdates.map(x => x.toString()) + "\n");
         //equal(recdates.length, expected.length);
         let fmt = cal.getDateFormatter();
 
         for (let i = 0; i < expected.length; i++) {
             // Check each date
             let ed = cal.createDateTime(expected[i]);
             dump("Expecting instance at " + ed + "(" + fmt.dayName(ed.weekday) + ")\n");
             dump("Recdate:");
@@ -727,36 +727,36 @@ function test_idchange() {
 
 function test_failures() {
     let item = makeEvent("DTSTART:20020402T114500Z\r\n" +
                          "DTEND:20020402T124500Z\r\n" +
                          "RRULE:INTERVAL=2;FREQ=WEEKLY;COUNT=6;BYDAY=TU,WE\r\n");
     let rinfo = item.recurrenceInfo;
     let ritem = cal.createRecurrenceDate();
 
-    throws(function() rinfo.getRecurrenceItemAt(-1), /Illegal value/, "Invalid Argument");
-    throws(function() rinfo.getRecurrenceItemAt(1), /Illegal value/, "Invalid Argument");
-    throws(function() rinfo.deleteRecurrenceItemAt(-1), /Illegal value/, "Invalid Argument");
-    throws(function() rinfo.deleteRecurrenceItemAt(1), /Illegal value/, "Invalid Argument");
-    throws(function() rinfo.deleteRecurrenceItem(ritem), /Illegal value/, "Invalid Argument");
-    throws(function() rinfo.insertRecurrenceItemAt(ritem, -1), /Illegal value/, "Invalid Argument");
-    throws(function() rinfo.insertRecurrenceItemAt(ritem, 2), /Illegal value/, "Invalid Argument");
-    throws(function() rinfo.restoreOccurrenceAt(cal.createDateTime("20080101T010101")), /Illegal value/, "Invalid Argument");
-    throws(function() cal.createRecurrenceInfo().isFinite, /Component not initialized/);
+    throws(() => rinfo.getRecurrenceItemAt(-1), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.getRecurrenceItemAt(1), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.deleteRecurrenceItemAt(-1), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.deleteRecurrenceItemAt(1), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.deleteRecurrenceItem(ritem), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.insertRecurrenceItemAt(ritem, -1), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.insertRecurrenceItemAt(ritem, 2), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.restoreOccurrenceAt(cal.createDateTime("20080101T010101")), /Illegal value/, "Invalid Argument");
+    throws(() => cal.createRecurrenceInfo().isFinite, /Component not initialized/);
 
     // modifyException with a different parent item
     let occ = rinfo.getOccurrenceFor(cal.createDateTime("20120102T114500Z"));
     occ.calendar = {}
     occ.id = "1234";
     occ.parentItem = occ;
-    throws(function() rinfo.modifyException(occ, true), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.modifyException(occ, true), /Illegal value/, "Invalid Argument");
 
     occ = rinfo.getOccurrenceFor(cal.createDateTime("20120102T114500Z"));
     occ.recurrenceId = null;
-    throws(function() rinfo.modifyException(occ, true), /Illegal value/, "Invalid Argument");
+    throws(() => rinfo.modifyException(occ, true), /Illegal value/, "Invalid Argument");
 
     // Missing DTSTART/DUE but RRULE
     item = createEventFromIcalString("BEGIN:VCALENDAR\r\n" +
         "BEGIN:VTODO\r\n" +
         "RRULE:FREQ=DAILY\r\n" +
         "END:VTODO\r\n" +
         "END:VCALENDAR\r\n"
     );
@@ -772,17 +772,17 @@ function test_immutable() {
         "RRULE:FREQ=DAILY\r\n" +
         "END:VTODO\r\n" +
         "END:VCALENDAR\r\n"
     );
     ok(item.recurrenceInfo.isMutable);
     let rinfo2 = item.recurrenceInfo.clone();
     rinfo2.makeImmutable();
     rinfo2.makeImmutable(); // Doing so twice shouldn't throw
-    throws(function() rinfo2.appendRecurrenceItem(ritem), /Can not modify immutable data container/);
+    throws(() => rinfo2.appendRecurrenceItem(ritem), /Can not modify immutable data container/);
     ok(!rinfo2.isMutable);
 
     let ritem = cal.createRecurrenceDate();
     rinfo.appenRecurrenceItem(ritem);
 }
 
 function test_rrule_icalstring() {
     var recRule = createRecurrenceRule();
--- a/calendar/test/unit/test_utils.js
+++ b/calendar/test/unit/test_utils.js
@@ -116,25 +116,25 @@ function test_getDefaultStartDate() {
 }
 
 function test_getStartEndProps() {
     equal(cal.calGetStartDateProp(cal.createEvent()), "startDate");
     equal(cal.calGetEndDateProp(cal.createEvent()), "endDate");
     equal(cal.calGetStartDateProp(cal.createTodo()), "entryDate");
     equal(cal.calGetEndDateProp(cal.createTodo()), "dueDate");
 
-    throws(function() cal.calGetStartDateProp(null),
-                    /2147500033/);
-   throws(function() cal.calGetEndDateProp(null),
-                    /2147500033/);
+    throws(() => cal.calGetStartDateProp(null),
+           /2147500033/);
+    throws(() => cal.calGetEndDateProp(null),
+           /2147500033/);
 }
 
 function test_calOperationGroup() {
     let cancelCalled = false;
-    function cancelFunc() cancelCalled = true;
+    function cancelFunc() { return cancelCalled = true; }
 
     let group = new cal.calOperationGroup(cancelFunc);
 
     ok(group.isEmpty);
     equal(group.id, cal.calOperationGroup.mOpGroupPrefix + "0");
     equal(group.status, Components.results.NS_OK);
     equal(group.isPending, true);
 
@@ -144,27 +144,27 @@ function test_calOperationGroup() {
 
     group.add(completedOp);
     ok(group.isEmpty);
     equal(group.isPending, true);
 
     let pendingOp1 = {
         id: 1,
         isPending: true,
-        cancel: function() this.cancelCalled = true
+        cancel: function() { return this.cancelCalled = true; }
     };
 
     group.add(pendingOp1);
     ok(!group.isEmpty);
     equal(group.isPending, true);
 
     let pendingOp2 = {
         id: 2,
         isPending: true,
-        cancel: function() this.cancelCalled = true
+        cancel: function() { return this.cancelCalled = true; }
     };
 
     group.add(pendingOp2);
     group.remove(pendingOp1);
     ok(!group.isEmpty);
     equal(group.isPending, true);
 
     group.cancel();