Review of "Bluetooth battery indicator" version 4

Details Page Preview

Bluetooth battery indicator

Extension Homepage
https://github.com/MichalW/gnome-bluetooth-battery-indicator

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Previous Reviews on this Version

andyholmes rejected
On line #36 of extension.js you add an idle source which in turn adds a timeout source at line #53. Since `_runLoop()` returns `undefined` the source id assigned to `this._loop` at line #36 is already removed, while at each iteration a new source is added at line #53 and the source id is leaked. You should either re-assign the `this._loop` variable at line #53, or ensure the source is removed some other way when your extension is disabled. On line #107 of extension.js you are leaking file descriptors. You must take ownership of all returned file descriptors and close them if you're using `GLib.spawn_async_with_pipes()`. It much safer and preferrable to use GSubprocess for use-cases like this (See: https://www.andyholmes.ca/articles/subprocesses-in-gjs.html for examples). Additionally you should probably just be calling `GLib.find_program_in_path()` (https://gjs-docs.gnome.org/glib20/glib.find_program_in_path) rather than spawning a process to see if it exists. Please fix these problems so your extension can be approved.