Replace idl nsISimpleEnumerator usage with Array<T> in mailnews/db
Categories
(MailNews Core :: General, task)
Tracking
(thunderbird_esr78 wontfix, thunderbird86 wontfix)
People
(Reporter: benc, Assigned: benc)
References
(Blocks 1 open bug)
Details
(Keywords: leave-open)
Attachments
(5 files, 1 obsolete file)
|
4.03 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
|
14.26 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
|
90.20 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
|
32.84 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
|
16.20 KB,
patch
|
benc
:
review+
|
Details | Diff | Splinter Review |
Replacing nsISimpleEnumerator with Array<> (where sensible!)
This covers:
mailnews/db/msgdb/public/nsIMsgDatabase.idl
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
A nice simple one - EnumerateOfflineOps() isn't used anywhere.
Updated•5 years ago
|
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/22507abc28b9
Remove unused nsIMsgDatabase.EnumerateOfflineOps(). r=mkmelin
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 3•5 years ago
|
||
Preparation for replacing the nsISimpleEnumerator use in nsIMsgDatabase with a custom enumerator (one which returns nsIMsgDBHdr objects rather than generic nsISupport ones).
This patch just switches a bunch of javascript over to use JS-style iterators (for...of) instead of the nsISimpleEnumerator methods (getNext/hasMoreElements).
Not strictly required - my new custom enumerator also supports getNext/hasMoreElements, but I'd like to ditch them eventually.
Try build here:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=697caced186b721abc8aa294c6fd9d19bf9e38f6
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 4•5 years ago
|
||
The various message enumeration functions I think have a genuine reason to be iterators rather than arrays - they could be dealing with large collections, with potentially costly access.
So this replaces nsISimpleEnumerator with a custom enumerator, just for dealing with nsIMsgDBHdr, which saves us a little bit of QI-from-nsISupports cruft on the C++ side.
We could definitely further improve the ergonomics on the C++ side, and deal with the slightly icky fact they can only be used once (which doesn't really fit in with the JS iterable protocol). But that's a bit out of scope here.
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1af5085b11fc
Use JS iterable protocol instead of nsISimpleEnumerator for nsIMsgDatabase.EnumerateMessages() calls. r=mkmelin
Updated•5 years ago
|
Comment 6•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 9•5 years ago
|
||
| Assignee | ||
Comment 10•5 years ago
|
||
Oh, I did try run here: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=2c208a012dd2acfed03b19538155497faff95b95
(that was a couple of days ago - I'm going to do another one later today with a followup patch if you'd prefer something more up-to-date)
Comment 11•5 years ago
|
||
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5cb26108d215
Remove nsISimpleEnumerator use in nsIMsgDatabase.enumerateThreads(). r=mkmelin
Updated•5 years ago
|
| Assignee | ||
Comment 13•5 years ago
|
||
I noticed that the nsMsgThreadedDBView setup had accumulated a few vestigial oddities, so I figured I should tidy it up a bit while I was there.
try run (just linux. Previous try run is for windows and osx too - I did a little more rearranging since, although the logic hasn't really changed):
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=6b3231de7d9b5425ae7594acbccf621c4f7fc3b3
Comment 14•5 years ago
|
||
| Assignee | ||
Comment 15•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/04f094d2c7b4
Tidy up nsMsgThreadedDBView::InitThreadedView() implementation. r=mkmelin
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Description
•