Skip to content
Commit ea43a1c4 authored by Philip Chimento's avatar Philip Chimento
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment