fix EOM if you close first window:
fix EOM if you close first window:

Fx has a weird bug that if you close a window, "await" never finishes or throw Error, execution just stops. I think it's https://bugzilla.mozilla.org/show_bug.cgi?id=1674505.
So I'll force async code (AddonManager.getAddonsByTypes) to run in current window scope.
It's ugly and looks hackish, but I think it's cheaper than simply removing @onlyonce for the script to load on every window.

xiaoxiaoflood/firefox-scripts,xiaoxiaoflood/firefox-scripts