Skip to content

overrides/Gio: Allow promisifying static methods

Florian Müllner requested to merge fmuellner/gjs:promisify-static into master

GIO's async pattern is not only used for object methods like Gio.DBusProxy.prototype.call(), but also for static methods like Gio.DBusProxy.new().

In order to make _promisify() usable with the latter, check whether the finish function actually exists for the GAsyncReadyCallback's source parameter, and call it on the proto otherwise.

Merge request reports