Consider dropping iteratorUtils.jsm / fixIterator
Categories
(MailNews Core :: Backend, enhancement)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: standard8, Assigned: mkmelin)
References
Details
(Keywords: perf)
Attachments
(4 files)
fixIterator
is now largely obsolete - arrays, nsISimpleEnumerators
, nsIArrays
can all be handled with for..of.
toArray(fixIterator(...))
could probably be replaced with [...directory.addressLists.enumerate()]
Hence, it seems like iteratorUtils.jsm should probably be deprecated/removed.
xref the discussion on bug 729069
Yes it was useful in the past so that our code and also addons didn't need to worry about what kind of array/enumerator they got (especially when we changed the object/interface in base TB).
If this can be accomplished with for..of now, then fixIterator may be unneeded.
What about the internal handling of QueryInterface() and queryElementAt(). Do we still need to specify interface for nsIArray elements?
Also, fixIterator returns a generator function so we would need to investigate whether we use that property of it (outside of for..of). And we don't know about addons.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 5•4 years ago
|
||
Needs a checkin-needed?
(or is there some phab-based way of doing it?)
Assignee | ||
Comment 6•4 years ago
|
||
Will land it later today.
Assignee | ||
Comment 8•4 years ago
|
||
There's now only a few cases left, which need .idl adjustments (I think) before they can be addressed.
Assignee | ||
Comment 9•4 years ago
|
||
Bug 1685484 would fix some, it seems.
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
Depends on D112669
Assignee | ||
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/72373036e9cf
Remove redundant fixIterator use in MsgComposeCommands. r=mkmelin
https://hg.mozilla.org/comm-central/rev/1c635a22ed37
Use JS arrays rather than nsIArray in attachment-* event payloads. r=mkmelin
Comment 13•4 years ago
|
||
Depends on D112663
Assignee | ||
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/12bc6e1f0064
Remove iteratorUtils.jsm. r=mkmelin
Description
•