Open Bug 1509981 Opened 6 years ago Updated 2 years ago

Replace uses of XPIDL [array] with Array<T>

Categories

(Core :: XPCOM, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: nika, Unassigned, Mentored)

References

(Depends on 4 open bugs, Blocks 1 open bug)

Details

The new Array<T> type is much nicer to use than the old XPIDL [array] type. We should switch to using this more ergonomic type in our idl files.
Priority: -- → P3
Depends on: 1530467
Depends on: 1550092
Depends on: 1550111
Depends on: 1550364
Depends on: 1550569
Depends on: 1550927
Depends on: 1550928
Depends on: 1550930
Depends on: 1550934
Depends on: 1550937
Depends on: 1551099
Depends on: 1551101
Depends on: 1551102
Depends on: 1551103
Depends on: 1551106
Depends on: 1551399
Depends on: 1551647
Depends on: 1551652
Depends on: 1551657
Depends on: 1551684
Depends on: 1551704
Depends on: 1551779
Depends on: 1552547
Depends on: 1556922
Depends on: 1556925
Depends on: 1557231
Depends on: 1557237
Depends on: 1557501
Depends on: 1557793
Depends on: 1557794
Depends on: 1557847
Depends on: 1557854
Depends on: 1557904
Depends on: 1557905
Depends on: 1557963
Depends on: 1557965
Depends on: 1558536
Depends on: 1558553
Depends on: 1558557
Depends on: 1558569
Depends on: 1558610
Depends on: 1558650
Depends on: 1558651
Depends on: 1558653
Depends on: 1558726
Depends on: 1558735
Depends on: 1558738
Depends on: 1558739
Depends on: 1558877
Depends on: 1565627
Depends on: 1566543
Depends on: 1566595

Is the plan to push on with the [array]-removal? I'm guessing it's a reasonably long term goal - there are still quite a few occurrences, representing a fair chunk of work.
From the Thunderbird point-of-view (Bug 1562158), I'm particularly interested in any upcoming plans there might be for converting nsICollation. We've got a few interfaces where collation keys are exposed, and converting them to Array[T] would mean a bunch of unnecessary extra malloc/copy/free conversions when talking to nsICollation. So I'm trying to decide if I should hold off on converting those interfaces, or just bite the bullet and add conversion code.

Flags: needinfo?(bzbarsky)

The plan is to generally push on with it, but I had run into some complicated cases that I wasn't sure how to best handle where data is being handed around and in Places, and was not worrying too much about it until Thunderbird got further along in its removals, since we can't remove array until that happens.

As far as nsICollation goes, I just looked and it looks like converting it on the Gecko side would not be too hard; there's really only one consumer. I assume such a conversion would break Thunderbird, but maybe it makes sense for me to write the Gecko-side bit, then you write the Thunderbird bits on top of it, then once it's all ready I land the Gecko part and you simul-land the Thunderbird part?

Flags: needinfo?(bzbarsky) → needinfo?(benc)

That'd be great! From an OCD point of view it'd be very satisfying to clean up all the occurrences on the TB side :-)

Flags: needinfo?(benc)
Depends on: 1588260

I filed bug 1588260 on nsICollation.

Depends on: 1593582
Depends on: 1620702
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.