length_is is never used in our IDL, and the new IDL parser doesn't even support it.
So right now we put size_is in both the size_is and length_is slot in the typelib format:
Within XPConnect, we sometimes check size_is, and sometimes query length_is.
We should immediately stop checking length_is within gecko, and use size_is exclusively. This will remove gecko's dependency on those bits so that, in a year or two, we'll be in a better place to kill them off entirely.
Created attachment 565637 [details] [diff] [review]
Remove use of length_is xpt value from gecko. v1
Added a patch. Flagging mrbkap for review.
Created attachment 568313 [details] [diff] [review]
part 1 - Remove array/string 'capacity' argument from XPCConvert. v1
So I actually got this wrong last time. I thought that the calls to GetArraySizeFromParam and GetArrayLengthFromParam were writing into the same value, but it they're actually writing into two separate values: 'capacity' and 'count'. So the previous patch posted here broke arrays entirely. Unfortunately, we didn't have test coverage for dependent parameters, so it didn't show up in our xpc tests. which made for a very orange try push. ;-)
I've now added test coverage for this stuff over in bug 693341, which gives me more confidence that I've got it right this time. length_is duplicates size_is, so 'capacity' is just an alias for 'count'. Let's get rid of it.
Flagging mrbkap for review.
Created attachment 568314 [details] [diff] [review]
part 2 - Remove use of length_is xpt value from gecko. v3
And now, we update the previous patch a tiny bit. Flagging mrbkap for re-review - just looking at the interdiff should suffice.
Pushed this to try:
Hopefully it can land before the branch.
Looks good on try. Pushed to mozilla-inbound:
Hopefully this should stick for FF10.