Verified Commit d46d45b9 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

fixup! Bug 40209: Implement Basic Crypto Safety

Use the new domain isolator interface
parent 6d782db3
Loading
Loading
Loading
Loading
+13 −1
Changes for browser/actors/CryptoSafetyParent.jsm: 13 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -14,6 +14,12 @@ const { XPCOMUtils } = ChromeUtils.import(

const lazy = {};

ChromeUtils.defineModuleGetter(
  lazy,
  "TorDomainIsolator",
  "resource://gre/modules/TorDomainIsolator.jsm"
);

XPCOMUtils.defineLazyGetter(lazy, "cryptoSafetyBundle", () => {
  return Services.strings.createBundle(
    "chrome://browser/locale/cryptoSafetyPrompt.properties"
@@ -80,7 +86,13 @@ class CryptoSafetyParent extends JSWindowActorParent {
    );

    if (buttonPressed === 0) {
      this.browsingContext.topChromeWindow.torbutton_new_circuit();
      const { browsingContext } = this.manager;
      const browser = browsingContext.embedderElement;
      if (browser) {
        lazy.TorDomainIsolator.newCircuitForBrowser(
          browser.ownerGlobal.gBrowser
        );
      }
    }
  }
}