Closed Bug 1583030 Opened 5 years ago Closed 4 years ago

[meta] replace idl nsIArray usage with Array<T> in Thunderbird code

Categories

(MailNews Core :: General, task)

task
Not set
normal

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
86 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: mkmelin, Assigned: benc)

References

Details

(Keywords: meta)

See bug 1550111 comment 0 and bug 1509978.
Usage if nsIArray in idls should be switched over to Array<T>. This will be much better ergonomics for js callers.

https://searchfox.org/comm-central/search?q=nsIArray&case=false&regexp=false&path=.idl

We should prioritize the ones with many callers first, like nsIMsgAccountManager.idl .
Once done fixIterator and friends can be eliminated: https://searchfox.org/comm-central/search?q=fixIterator&case=false&regexp=false&path=mail

Assignee: nobody → benc
Depends on: 1612237
Depends on: 1612239
Depends on: 1612240
Depends on: 1612241
Depends on: 1612242
Depends on: 1612244
Depends on: 1612245
Depends on: 1612246
Depends on: 1612247
Depends on: 1612248
Depends on: 1612249
Depends on: 1614846

I didn't originally spot that nsIMutableArray was derived from nsIArray. Those should all be replaced too...

Depends on: 1681009

Hi Ben, I'm going to implement nsISmtpService in JS in bug 1679730, then found readonly attribute nsISimpleEnumerator servers; https://searchfox.org/comm-central/rev/8a81725ff0230661a6a66f675c733d4b87645578/mailnews/compose/public/nsISmtpService.idl#90. Is there plan to migrate nsISmtpService.idl or maybe nsISimpleEnumerator is a separate issue? Thanks.

nsISimpleEnumerator is a different issue, which Ben is going to take on next. The usage you mentioned is indeed very pointless enumerator usage that is seems to do nothing except wrap an internal array to... make things harder.
I filed bug 1681031 for meta tracking that now.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.