Closed Bug 677788 Opened 9 years ago Closed 8 years ago

length_is duplicates size_is


(Core :: XPCOM, defect)

Not set





(Reporter: khuey, Assigned: bholley)




(2 files, 1 obsolete file)

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.
Assignee: nobody → bobbyholley+bmo
Added a patch. Flagging mrbkap for review.
Attachment #565637 - Flags: review?(mrbkap)
Attachment #565637 - Flags: review?(mrbkap) → review+
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.
Attachment #568313 - Flags: review?(mrbkap)
And now, we update the previous patch a tiny bit. Flagging mrbkap for re-review - just looking at the interdiff should suffice.
Attachment #568314 - Flags: review?(mrbkap)
Attachment #565637 - Attachment is obsolete: true
Attachment #568314 - Flags: review?(mrbkap) → review+
Attachment #568313 - Flags: review?(mrbkap) → review+
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.
Target Milestone: --- → mozilla10
Blocks: 728149
You need to log in before you can comment on or make changes to this bug.