Closed Bug 1347225 Opened 3 years ago Closed 2 years ago

Move service and instance accessors to calUtils.jsm

Categories

(Calendar :: General, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

Attachments

(1 file, 1 obsolete file)

The service and instance accessors will likely end up in calUtils.jsm, unless we decide to create a CalServices or something like that in the future. This patch will move those functions over.
Attached patch Fix - v1 (obsolete) — Splinter Review
Attachment #8847188 - Flags: review?(makemyday)
Comment on attachment 8847188 [details] [diff] [review]
Fix - v1

Review of attachment 8847188 [details] [diff] [review]:
-----------------------------------------------------------------

::: calendar/base/modules/calUtils.jsm
@@ +14,5 @@
>  Components.classes["@mozilla.org/calendar/backend-loader;1"].getService();
>  
>  this.EXPORTED_SYMBOLS = ["cal"];
>  var cal = {
> +    createEvent: _instance("@mozilla.org/calendar/event;1",

Can you please add a comments to document the purposes of this accessors (either a general comment at the top of the block or separate ones).

@@ +1013,5 @@
>  };
>  
> +/**
> + * Returns a function that provides cached access to whatever the passed
> + * function returns.

Can you add a sentence that this function is local to this module? This applies also to the two other _functions below.

@@ +1029,5 @@
> +    };
> +}
> +
> +/**
> + * Returns a function that provices access to the given service.

typo: provides
Attachment #8847188 - Flags: review?(makemyday) → review+
Priority: -- → P1
Attached patch Fix - v2Splinter Review
Updated patch (also considering review comments) and Carrying over r+.
Attachment #8847188 - Attachment is obsolete: true
Attachment #8897989 - Flags: review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/9ed0ce8f4802
Move service and instance accessors to calUtils.jsm. r=MakeMyDay
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 5.9
You need to log in before you can comment on or make changes to this bug.