Closed Bug 1293004 Opened 3 years ago Closed 3 years ago

Replace in-tree consumer of non-standard Iterator() with Object.{values,entries} in chat/ in comm-central

Categories

(Chat Core :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Instantbird 53

People

(Reporter: arai, Assigned: dwivedi.aman96, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [good first bug] [lang=js])

Attachments

(1 file)

separated from bug 1290637.
see bug 1290637 for the details.

Required code changes are following:
  * Check each usage of non-standard Iterator [1] function,
    and replace it with Object.entries [2] or Object.values [3],
    or something appropriate for the specific usage

Here's the rough list for Iterator() usage (not exhaustive)
https://dxr.mozilla.org/comm-central/search?q=%22+Iterator(%22+path%3Achat%2F&redirect=false

for example:
  for (let [k, v] in Iterator(obj)) {
    ...
  }
can be replaced to:
  for (let [k, v] of Object.entries(obj)) {
    ...
  }

another example:
  for (let [, v] in Iterator(array)) {
    ...
  }
can be replaced to:
  for (let v of array) {
    ...
  }


[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
[3] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values
Mentor: arai.unmht
Keywords: good-first-bug
Whiteboard: [good first bug] [lang=js]
If this is a good first-timer's bug, I would like to take this bug. Can you guide me further?
Thanks.
document for downloading source and building it here:
  https://developer.mozilla.org/en-US/docs/Simple_Thunderbird_build

whole workflow is here (Step 1 is a bit different tho):
  https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction

if you have any other question, feel free to ask here, or in IRC #introduction channel.
In addition, #instantbird is a good channel for chat/-specific questions, and of course #maildev for Thunderbird.
Can I skip thunderbird build? Except building thunderbird, I'm all set for next step.
although it's better if you can build and test locally, it's not required.  we can also test your patch on server.
feel free to post the patch when it's ready :)
Hi Tooru! I would like to take this up. Please assign it to me.
Flags: needinfo?(arai.unmht)
Great!
Assignee: nobody → dwivedi.aman96
Status: NEW → ASSIGNED
Flags: needinfo?(arai.unmht)
Hope this patch works! :)
Attachment #8823223 - Flags: review?(arai.unmht)
Comment on attachment 8823223 [details] [diff] [review]
BugFix1293004.patch

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

Thank you for your patch :D

It looks good.
forwarding review to aleth, since I'm not module owner here.
Attachment #8823223 - Flags: review?(arai.unmht)
Attachment #8823223 - Flags: review?(aleth)
Attachment #8823223 - Flags: feedback+
Comment on attachment 8823223 [details] [diff] [review]
BugFix1293004.patch

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

Thanks!
Attachment #8823223 - Flags: review?(aleth) → review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/d16104cb778d72d07bdb978d9fb194a623d29aee
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Instantbird 53
You need to log in before you can comment on or make changes to this bug.