Replaces XPIDL uses of nsIArray with Array<T>
Categories
(Core :: XPCOM, enhancement, P3)
Tracking
()
People
(Reporter: nika, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
Reporter | ||
Updated•6 years ago
|
Comment 1•5 years ago
|
||
Out of interest, is there any canonical documentation on this? In particular, how the xpidl types map to C++ types?
There are a few hints here and there (eg https://bugzilla.mozilla.org/show_bug.cgi?id=1551704#c1), but mostly I've been looking at patches on Bug 1509981 to try and work it out.
Comment 2•5 years ago
|
||
(In reply to Ben Campbell from comment #1)
Out of interest, is there any canonical documentation on this? In particular, how the xpidl types map to C++ types?
https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XPIDL is apparently kept relatively fresh. The information you're looking for is primarily tables 1 and 2 (and probably should be adjusted to add Rust notes too).
Comment 3•5 years ago
|
||
Thanks Joshua.
One thing that caused me a few minutes head-scratching just now is that an .idl definiton of:
Array<AString> getFoo()
comes out in C++ as:
NS_IMETHOD GetFoo(nsTArray<nsString >& _retval)
Rather than what I was expecting:
NS_IMETHOD GetFoo(nsTArray<nsAString >& _retval)
ie different to the AString
-> nsAString
mapping for non-array strings.
It's obvious in hindsight - nsAString
is abstract, but the nsTArray
needs to hold a concrete class.
Not suggesting any action on this, just wanted to leave breadcrumbs in case anyone else got confused too :-)
Updated•4 years ago
|
Updated•2 years ago
|
Description
•