Rework when and how noscript is updated (to remove more features from TorController) in Android
Carry over from the TorController refactor pt 2:
TLDR: TorController still needs code to register bootstrap listeners and callbacks for this last use case since it's run before the Engine is initialized so direct calls to TorAndroidIntegration fail. Pierov suggested a few different structural changes to pursue but time ran out on that particular MR so we're moving that restructuring to a separate issue and investigation task
If I understand correctly, this is used only by
TorBrowserFeatures
to update NoScript.
So, I think we could move the call to
TorBrowserFeatures.install
tosetupInMainProcessOnly
to solve the loop you talked about on IRC without adding this additional interface.
Even though the webcompat extension is installed right after the
GeckoEngine
initialization,setupInMainProcessOnly
seems a good place for this kind of stuff (however, I'm not an expert of the lifecycle of Fenix, GeckoView and addons).
Otherwise, we could split the install function in two pieces: one for extension stuff, and one for setting up the bootstrap observer.
Actually, we do
twothree things:
- migrate away from HTTPS Everywhere
- install NoScript
- register the bootstrap listener to enable automatic updates for NoScript (assuming the problems found in #42353 (closed) still apply)
The split I was considering (if needed because of Gecko's constraints) is 1+2 together (since they use Gecko API), and 3 on its own (since it uses our API in the immediate, I think we can take for granted bootstrap will happen after a while, not during initialization).
However, at this point I'd rather being as surgical as possible, as these changes are going directly to stable. At least on Android the updater is external, so worst case scenario we issue an update as soon as we can (still, one I'd prefer to avoid, and not gonna lie, you mentioning a crash is worrisome).