Skip to content

Bug_41188: Additional refactoring + basic error handling for testing

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

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 : clairehurst, dan
    • build system : boklm
    • extensions : ma1
    • firefox internals (XUL/JS/XPCOM) : ma1
    • fonts : pierov
    • frontend (implementation) : henry
    • frontend (review) : donuts, richard
    • localization : henry, pierov
    • macos : clairehurst, dan
    • nightly builds : boklm
    • rebases/release-prep : dan, ma1, pierov, richard
    • security : ma1
    • signing : boklm, richard
    • updater : pierov
    • misc/other : pierov, richard

Change Description

Mostly more refactoring, with some basic error handling mostly for testing screens with simulated censorship.

How Tested

With simulated censorship (with any value > 0, not sure why it behaves this way, maybe we can reuse HTML code for this?) trying to connect should send you through the screens shown here image (except for location error, I'm not sure the best way to detect location yet and will look more into that later)

The final error screen was also finished, adding functionality to restart the app and properly labeling the buttons.

For simulated censorship (which doesn't work properly yet on native), you need to bootstrap once (or switch to HTML UI and hit back) to be able to go to about:config. Then you add a new integer preference called torbrowser.debug.censorship_level, which can have these values:

  1. no censorship
  2. it will ask you to provide a bridge
  3. it will fail to detect a country, and will ask you to provide one
  4. always fail

Merge request reports