Closed Bug 983715 Opened 10 years ago Closed 10 years ago

Make findAlarms Asynchronous

Categories

(Calendar :: Internal Components, defect)

Lightning 3.2
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: anderson, Assigned: anderson)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140218140359



Actual results:

Replace a for each loop with the asynchronous cal.forEach, and use promises to ensure everything is still executed in the correct order.
Attached patch Async.patch β€” β€” Splinter Review
Attachment #8391297 - Flags: review?(philipp)
Assignee: nobody → anderson
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8391297 [details] [diff] [review]
Async.patch

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

Looks good, r=philipp. Thanks for the patch!
Attachment #8391297 - Flags: review?(philipp) → review+
Comment on attachment 8391297 [details] [diff] [review]
Async.patch

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

One minor nit, plus 2 whitespace changes. Nothing important though, I've fixed this before checkin:

::: calendar/base/src/calAlarmService.js
@@ +526,5 @@
>                                                                       aStatus,
>                                                                       aOperationType,
>                                                                       aId,
>                                                                       aDetail) {
> +                let promise = this.addRemovePromise.promise.then((aValue) => {

I removed the unused variable here
Pushed to comm-central changeset 956d8a7b71e8
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: