Closed Bug 13817 Opened 25 years ago Closed 25 years ago

xpconnect assumes that getter preceeds setter

Categories

(Core :: XPConnect, defect, P3)

x86
All
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: jband_mozilla, Assigned: jband_mozilla)

Details

When typelibs have attributes that are not readonly (i.e. have both a getter and setter) then xpconnect ASSUMES that the getter will come first followed immediately by the setter. The reason xpconnect imposes this restriction has to do with the fact that we don't support writeonly. xpconnect walks through the methods building its own representation. It uses one struct for attributes and marks them as having a getter and/or setter. I didn't want to have a state for these structs where there is a setter but no getter. While this is not a valid 'final' state, if the setter were to preceed the getter in the typelib then the struct would 'pass through' that state as this information is read from the interface info manager. The 'immediately' preceeding part is so that as building this array of info xpconnect does not have to do a lookup to match a getter with a setter. I could work around all this at some cost or leave it as is with this restriction. Is this completely whacked? Should we specify this restriction in the typelib format or 'fix' xpconnect? I'd rather specify this in the typelib and be done with it, but I'm open to suggestion.
Status: NEW → ASSIGNED
code is at http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/src/xpcwrappednativecla ss.cpp#158 adding fur so as to waste some of his time and perhaps get an opinion :)
Well, I'm thinking that it was a waste of time to even write this all up. Considering the goals of the typelib spec - to support xpconnect - I'm just going to add this as a requirement in the spec and be done with it!
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Modified spec.
Status: RESOLVED → VERIFIED
i see you're taking bug fixing lessons from fur!
You need to log in before you can comment on or make changes to this bug.