js: Refactor gjs_object_*_property()
This code was due for some refactoring, and changing GjsConstString to be rooted in the following commit was the opportunity for it. We now have gjs_object_get_property(), gjs_object_has_property(), gjs_object_set_property(), and gjs_object_define_property() as wrappers for JS_GetPropertyById(), etc., that take a GjsConstString constant instead of a jsid. In addition, we rename gjs_object_require_property_value() to be an overload of gjs_object_require_property(); the old name was confusing because the name _without_ "value" was the one that dealt with a JS::Value! Same rename for gjs_object_require_converted_property_value(). This whole thing allows us to get rid of some code, moving a bunch of roots into these new functions. These roots are strictly speaking still necessary, but in the next commit we're going to root all the interned strings permanently, which should have been done all along. https://bugzilla.gnome.org/show_bug.cgi?id=776966
parent
c5b0c1b4
Please register or sign in to comment