-
Philip Chimento authored
These hooks are going away in SpiderMonkey 60, so we have to do something different. Instead of intercepting the getProperty/setProperty operations, we lazily define a JS property for each GObject property or field accessed in the resolve hook. This uses the same native-accessor-with-private-data API used in gi/boxed.cpp. Two separate sets of accessors are used for properties and fields, which makes them a bit simpler than the previous code. One behaviour change is that we now can't distinguish whether we're setting a readonly property in strict mode or not. Now we always throw when setting a readonly property; in effect, we treat the property set as if it were always in strict mode. ES6 modules are always treated as strict mode, so this is a change that client code will have to go through anyway when using ES6 modules. Closes: #160
729dad66