
The original scripting framework was based on SpiderMonkey's pre-standard generators, and was simply translated to the corresponding standard syntax when updating it to work with recent JS versions. We can do even better by using the standard async/await pattern instead of generators/yield. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1396