Commits on Source 8

  • henry's avatar
    fixup! TB 40933: Add tor-launcher functionality · b61277be
    henry authored
    TB 44796: Convert `TorProviders` types to strings.
    
    This allows them to be used in log messages.
    b61277be
  • henry's avatar
    fixup! TB 40933: Add tor-launcher functionality · 6a41ffd8
    henry authored
    TB 44796: Add `TorProviderState`, which tracks the state of a provider.
    
    We create a new `TorProviderBase` class which tracks this state, and the
    existing `TorProvider` now extends.
    
    `TorProviderBuilder.sys.mjs`:
    + We provide a callback to let the current provider instance let
      `TorProviderBuilder` know when this state has changed.
    + This will emit `TorProviderSateChanged` as a replacement for
      `TorProcessExited`. The `Stopped` state has the same role as the
      previous event, except it is more generic. This event also lets any
      consumers know when a provider has been just replaced (`Starting`) and
      successfully initialised (`Running`).
    
    `TorControlPort.sys.mjs`:
    + Add `onClosed` callback to signal to the `TorProvider` that the
      control port has closed, which will trigger `_stoppedInternal`.
    + Delay adding the event handler so the `TorProvider` only listens to a
      control port after it is successfully set up and adopted by the
      `TorProvider`.
    
    `TorProvider.sys.mjs`:
    + `TorProvider` no longer emits `TorProviderTopics.ProcessExited`.
    + Instead, `TorProvider` calls `_stoppedInternal` whenever the provider
      stops running. I.e. whenever the control port is closed, which
      includes when the process exits but also other scenarios where the
      control port might close unexpectedly.
    6a41ffd8
  • henry's avatar
    fixup! TB 40933: Add tor-launcher functionality · 7167229f
    henry authored
    TB 44796: Convert the "none" provider into a `TorProviderNone` class, so
    it can be handled by the same logic as `TorProvider`.
    7167229f
  • henry's avatar
    fixup! TB 40933: Add tor-launcher functionality · adba934e
    henry authored
    TB 44796: Add the `settledState` method to allow `TorConnect` to wait
    for the first provider's state after it has settled. This is a way to
    get the current providers state prior to having listened to
    `TorProviderStateChange`.
    
    Add the `replace` method to allow `TorConnect` to request a new provider
    on the user's behalf.
    adba934e
  • henry's avatar
    fixup! TB 40933: Add tor-launcher functionality · e74c8d84
    henry authored
    TB 44796: Drop `#torExited` and internals of `firstWindowLoaded` and
    instead use promptProviderState which handles both. These are only
    temporary changes to be dropped in #43570.
    e74c8d84
  • henry's avatar
    fixup! TB 40597: Implement TorSettings module · 615707ff
    henry authored
    TB 44796: Listen for ProviderStateChanged rather than ProcessStopped.
    615707ff
  • henry's avatar
    fixup! TB 40933: Add tor-launcher functionality · 48f5bfb2
    henry authored
    TB 44796: Drop `TorProvider.isRunning`.
    48f5bfb2
  • henry's avatar
    fixup! TB 40597: Implement TorSettings module · 424f8e1a
    henry authored
    TB 44796: Use `TorProvider.state` instead of `isRunning`.
    424f8e1a
Loading
Loading