GNOME Bugzilla – Bug 708920
GObject: fix accessor properties on GObject classes
Last modified: 2013-10-21 19:26:27 UTC
We must not access this.prototype blindly, because a property there might be an accessor that relies on some external state we don't have on prototypes. Instead, access the property descriptor, like Lang.Class does.
Created attachment 255923 [details] [review] GObject: fix accessor properties on GObject classes
What exactly is this fixing?
Say you have a GObject class, and say this class has accessor properties (implementing GObject properties). If the getter for one of this properties cannot be called before the class is initialized (for example it does "return this._someObject.someProperty", which fails if this._someObject is not an object), then the program crashes at startup.
Review of attachment 255923 [details] [review]: Makes sense, thanks!
Attachment 255923 [details] pushed as 48b6933 - GObject: fix accessor properties on GObject classes