object: Refactor to use GjsMaybeOwned instead of keep-alive
In object.cpp, we previously kept a GObject's JS wrapper object alive by adding it to the keep-alive object. We can now use GjsMaybeOwned for this purpose if we add an accessor function to check whether the GjsMaybeOwned is in rooted mode. This is in preparation for an even deeper refactor where we replace the JS::Heap wrapper stored in the object's qdata with GjsMaybeOwned as well. This requires a small change to GjsContext's dispose handler so that we handle all pending toggle notifications before doing the first garbage collection. https://bugzilla.gnome.org/show_bug.cgi?id=776966
parent
4b0523ce
Please register or sign in to comment