Replace idl nsIArray usage with Array<T> in mailnews/import/
Categories
(MailNews Core :: General, task)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: benc, Assigned: benc)
References
Details
Attachments
(4 files, 1 obsolete file)
33.69 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
48.84 KB,
patch
|
benc
:
review+
|
Details | Diff | Splinter Review |
1.26 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
1.75 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
Covers:
mailnews/import/public/nsIImportAddressBooks.idl
mailnews/import/public/nsIImportService.idl
mailnews/import/public/nsIImportGeneric.idl
mailnews/import/public/nsIImportMail.idl
Assignee | ||
Comment 1•4 years ago
|
||
Mostly straightforward, but nsIImportGeneric.GetData() and SetData() are tricky. They return/take an nsISupports, but the exact type passed depends on the dataId
param:
nsISupports GetData(in string dataId);
void SetData(in string dataId, in nsISupports pData);
It returns an nsIArray for dataId of either "mailBoxes" or "addressBooks", but I can't see that they are ever used anywhere. I added a stopgap to build and return an nsIArray, so they will work. But if nothing is using them maybe I can just ditch those two cases entirely?
In any case, I think we should move away from interfaces which pass nsISupports objects as variant types. Unless there's any objection I'll start writing such cases up in their own bugs.
Try run here:
And again, for windows (with a one line fix, but otherwise identical):
Assignee | ||
Comment 2•4 years ago
|
||
And the equivalent for nsIImportMail
. Same comments apply here as above (the nsImportGenericMail::SetData()
/GetData()
methods can take/return an nsIArray
if "mailBoxes" is passes as the dataId
)
try run here:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=cf51cf9c638ac5630bb8036d183fdefde9770318
And again, with compilation fixes for Windows and OSX:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=fa509873a20a2ab41302b434e2fde6d15bee4644
Comment 3•4 years ago
|
||
Comment 4•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
Same as previous nsIImportMail patch, but FindMailboxes() is now findMailboxes() in idl and javascript files.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
nsIImportAddressBooks.FindAddressBooks() isn't used at all by javascript, so I'm not sure what the policy is on lower-camel-casing interface methods we touch.
Hence a separate patch.
I'd guess none of the other methods have any javascript either, but I wouldn't change them without spending a little more time on testing/try runs etc... not sure it's worth it.
Assignee | ||
Comment 7•4 years ago
|
||
And one typo-fixup, because it irked me :-)
Updated•4 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/97258a0f665c
Remove nsIArray use from nsIImportAddressBooks. r=mkmelin
https://hg.mozilla.org/comm-central/rev/f2b3b28f14d1
Remove nsIArray use from nsIImportMail. r=mkmelin
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 9•4 years ago
|
||
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/e3a9cad7f5cc
Followup. Rename idl nsIImportAddressBooks.FindAddressBooks() to findAddressBooks(). r=mkmelin
https://hg.mozilla.org/comm-central/rev/2bcaef14a6f8
Followup. Rename TestMailImpoter to TestMailImporter. r=mkmelin
Description
•