Review of "Frequency Boost Switch" version 2

Details Page Preview

Add a toggle to enable/disable CPU frequency boost in Gnome Quick Settings menu.

Extension Homepage
https://gitlab.com/metal03326/gnome-frequency-boost-switch

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

Version Status
22 Active
21 Active
20 Active
19 Active
18 Rejected
17 Rejected
16 Rejected
15 Active
14 Active
13 Active
12 Active
11 Active
10 Active
9 Active
8 Active
7 Rejected
6 Active
5 Active
4 Active
3 Active
2 Active
1 Rejected

Previous Reviews on this Version

JustPerfection rejected
1. Line 36 to 60 (extension.js) shouldn't be inside that `if` block. It is like being inside init() or even global scope now. 2. You should also null out `state` and `settings` in disable.
JustPerfection posted a review
You can also use ExtensionUtils.initTranslations() instead of manually binding gettext domain. There is also ExtensionUtils.gettext() if you want to use that: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/misc/extensionUtils.js
metal03326 waiting for author
Thanks, I'm a bit lost on both points. 3rd is cool, I'll look at it. Can you clarify 1 and 2? 1. If statement is in enable(), not in init(), how it "is like being inside init() or even global scope now"? 2. state and settings are local variables, they should get destroyed when the block executes, no? If no, is there a way to clean them without making them global variables (which I find is a waste of RAM)? I come from web development, where garbage collection is automatic and block scoped variables which are not part of a closure get cleaned after the block executes. Maybe it is different here and that is why I'm so lost.
JustPerfection active
Oh! Sorry! I completely missed them being local. Approved.