Object resolve should consider prototypes of GObject interfaces
It's currently not possible to add or monkeypatch methods on a GObject interface:
const {Gio} = imports.gi;
Gio.File.prototype.test = 42;
const file = Gio.File.new_for_path('.');
print(file.test);
This is undefined
and not 42
. (new_for_path()
actually returns you an instance of GLocalFile
which is a class that implements the Gio.File
interface.)
The resolve hook in object.cpp should, when searching the prototype of a class, also search the prototypes of any implemented interfaces.
/cc @llzes