Verified Commit c62d3405 authored by ma1's avatar ma1
Browse files

fixup! Bug 40926: Implemented the New Identity feature

Bug 41765: Force about:privatebrowsing in new identity window.
parent 251bec3a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4585,7 +4585,7 @@ function OpenBrowserWindow(options) {
  var extraFeatures = "";
  if (options && options.private && PrivateBrowsingUtils.enabled) {
    extraFeatures = ",private";
    if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
    if (!PrivateBrowsingUtils.permanentPrivateBrowsing || options.private === "no-home") {
      // Force the new window to load about:privatebrowsing instead of the default home page
      defaultArgs = "about:privatebrowsing";
    }
+2 −5
Original line number Diff line number Diff line
@@ -433,11 +433,8 @@ XPCOMUtils.defineLazyGetter(this, "NewIdentityButton", () => {
    openNewWindow() {
      logger.info("Opening a new window");
      return new Promise(resolve => {
        // Open a new window with the default homepage
        // We could pass {private: true} but we do not because we enforce
        // browser.privatebrowsing.autostart = true.
        // What about users that change settings?
        const win = OpenBrowserWindow();
        // Open a new window forcing the about:privatebrowsing page (tor-browser#41765)
        const win = OpenBrowserWindow({private: "no-home"});
        // This mechanism to know when the new window is ready is used by
        // OpenBrowserWindow itself (see its definition in browser.js).
        win.addEventListener("MozAfterPaint", () => resolve(), { once: true });