Closed Bug 1098585 Opened 5 years ago Closed 4 years ago

Get rid of __iterator__ in calendar/

Categories

(Calendar :: Internal Components, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

()

Details

Attachments

(1 file)

bug 694100 wants to remove __iterator__, we should remove it from calendar. I guess ES6 iterators are the new thing.
Sorry, wrong bug. I meant bug 1098412.
Blocks: 1098412
No longer blocks: es6
This needs to be done for bug 1280898. We need to get rid of all old-style generators (non-star-function with yield keyword in use) so that eslint will not barf.
Assignee: nobody → philipp
Blocks: 1280898
Status: NEW → ASSIGNED
Comment on attachment 8763714 [details] [diff] [review]
Fix - v1

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

Looks good, just one minor nit. r=me

::: calendar/base/modules/calIteratorUtils.jsm
@@ +72,4 @@
>                      }
>                  }
> +
> +                if (done) {

Simply use else here.
Attachment #8763714 - Flags: review?(makemyday) → review+
(In reply to [:MakeMyDay] from comment #4)
> > +                if (done) {
> 
> Simply use else here.

else would not work, because there is a case where |done| is changed in the first if block a few lines up. This second if should also catch that case.
https://hg.mozilla.org/comm-central/rev/c8afe5b01783
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 5.2
You need to log in before you can comment on or make changes to this bug.