GjsDBusImplementation.emit_property_changed(..., null): assertion failed
System information
What is your operating system and version? Arch Linux
What is your version of GJS? gjs 2:1.68.1-1
Bug information
Steps to reproduce
const { Gio } = imports.gi;
const XML = `<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="com.github.amezin.GjsBug">
<property name="Property" type="i" access="read"/>
</interface>
</node>
`;
class InterfaceImpl {
get Property() {
return 0;
}
};
Gio.DBusExportedObject.wrapJSObject(XML, new InterfaceImpl()).emit_property_changed('Property', null);
Current behaviour
(gjs:157924): GLib-CRITICAL **: 23:44:01.710: g_variant_ref: assertion 'value != NULL' failed
(gjs:157924): GLib-CRITICAL **: 23:44:01.710: g_variant_unref: assertion 'value != NULL' failed
Expected behaviour
Expected no error, because https://gitlab.gnome.org/GNOME/gjs/-/blob/e3494eb6be742edf8f4e60c99d471e506eae5c46/libgjs-private/gjs-gdbus-wrapper.c#L354 :
* @newvalue: (allow-none): the new value, or %NULL to just invalidate it