object: Support fields defined in ancestor classes
We define a JS property with getter and setter for a GObject field in resolve_impl() (where lazy properties are defined) when JS code tries to access a field. The getter and setter retrieve the field's GIFieldInfo information from a cache, using a key that is built into the getter and setter. Because this is done during the resolve operation, and the resolve operation can occur multiple times going up the prototype chain, the JS property may end up on a prototype that is an ancestor of the object's direct prototype. So the GIFieldInfo may end up on any prototype in the prototype chain, and so we have to search through the prototype chain for it. Closes: #223.
Showing with 51 additions and 13 deletions