boxed: Use JSNative property accessors
Property accessors of JSPropertyOp and JSStrictPropertyOp are going away in future versions of SpiderMonkey, to be replaced by JSNative. Unfortunately the property name was passed to the PropertyOp callbacks as a jsid, and it is not available to JSNative callbacks. The property accessors in Boxed do require the property name, however, so they can look up the GIFieldInfo. In order to achieve this we follow a suggestion from a Mozilla mailing list [1]: wrap the JSNative accessors in JSFunction objects, which can have "reserved slots" in which to store information with which we can retrieve the field info. For this, we need to use the jsfriend API, but such use is isolated to two functions. [1] https://groups.google.com/forum/#!msg/mozilla.dev.tech.js-engine.internals/TZznbH80zJw/BmRrMsuuAwAJ https://bugzilla.gnome.org/show_bug.cgi?id=776966
parent
d857b26a
Please register or sign in to comment