Instantiating incorrectly a Gio.FileIcon results in a segfault
Instantiating an icon with
let icon = new Gio.FileIcon(gioFileToTheIcon);
results in Gnome shell crashing when it is used with an St.Icon.
Instead, both:
let icon = new Gio.FileIcon({file: gioFileToTheIcon})
and
let icon = Gio.FileIcon.new(gioFileToTheIcon)
work fine.
I think that gjs should fail gracefully with an exception when a constructor receives something that isn't an array, instead of crashing, because an extension with such a bug can cause the desktop to stop booting if it is triggered during the startup process.