Skip to content

Bug 40938 (part 3): Start using the new control port methods

Merge Info

Related Issues

Backporting

Timeline

  • Immediate: patchset needed as soon as possible
  • Next Minor Stable Release: patchset that needs to be verified in nightly before backport
  • Eventually: patchset that needs to be verified in alpha before backport
  • No Backport (preferred): patchset for the next major stable

(Optional) Justification

  • Emergency security update: patchset fixes CVEs, 0-days, etc
  • Censorship event: patchset enables censorship circumvention
  • Critical bug-fix: patchset fixes a bug in core-functionality
  • Consistency: patchset which would make development easier if it were in both the alpha and release branches; developer tools, build system changes, etc
  • Sponsor required: patchset required for sponsor
  • Other: please explain

Merging

  • Merge to tor-browser - !fixups to tor-browser-specific commits, new features, security backports
  • Merge to base-browser - !fixups to base-browser-specific commits, new features to be shared with mullvad-browser, and security backports
    • NOTE: if your changeset includes patches to both base-browser and tor-browser please clearly label in the change description which commits should be cherry-picked to base-browser after merging

Issue Tracking

Review

Request Reviewer

  • Request review from an applications developer depending on modified system:
    • NOTE: if the MR modifies multiple areas, please /cc all the relevant reviewers (since gitlab only allows 1 reviewer)
    • accessibility : henry
    • android : dan
    • build system : boklm
    • extensions : ma1
    • firefox internals (XUL/JS/XPCOM) : ma1
    • fonts : pierov
    • frontend (implementation) : henry
    • frontend (review) : donuts, richard
    • localization : henry, pierov
    • nightly builds : boklm
    • rebases/release-prep : dan_b, ma1, pierov, richard
    • security : ma1
    • signing : boklm, richard
    • updater : pierov
    • misc/other : pierov, richard

Change Description

In !709 (merged) I refactored the browser control port implementation, however I also kept some old methods, and I didn't touch TorProtocolService in it.

Then, in !716 (merged) I started TorProvider as a refactor of TorProtocolService, and moved TorMonitorService in it. It didn't change the implementations, unless needed, because they were a lot of trivial changes, I didn't want to include also non trivial ones.

Then, this is the following part. It removes the old methods and make the consumers use only the new ones.

I've also renamed some keys to be more JavaScript-ish, instead of using the names from the control port. For the rest, I've removed the occurrences of TorProtocolService and TorMonitorService here and there. Since I was already changing the references to .sys.mjs, I've also esmified the modules of the TorSettings/TorConnect commit.

However, I've noticed that Moat.sys.mjs could use some more changes. I thought we already done them, but we hadn't. I think it could undergo even more changes (e.g., use regexes for the parsing), but I didn't want to change even more. After these changes, I've checked all the public methods of MoatRPC manually, and they still behaved as expected.

In the next part, I will better merge the old TorMonitorService implementation in TorProvider. I preferred to wait because we already had important changes in TorProvider.

Merge request reports