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

fixup! BB 40926: Implemented the New Identity feature

BB 44288: Regression, custom home page not blocked anymore on new identity.
parent f3289251
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -402,7 +402,8 @@ ChromeUtils.defineLazyGetter(this, "NewIdentityButton", () => {
        const isCustomHome =
          Services.prefs.getIntPref("browser.startup.page") === 1;
        const win = OpenBrowserWindow({
          private: isCustomHome && isTrustedHome ? "private" : "no-home",
          private: true,
          skipCustomHome: !(isCustomHome && isTrustedHome),
        });
        // This mechanism to know when the new window is ready is used by
        // OpenBrowserWindow itself (see its definition in browser.js).
@@ -435,7 +436,7 @@ ChromeUtils.defineLazyGetter(this, "NewIdentityButton", () => {
              }
              const callback = () => {
                Services.prefs.setStringPref(trustedHomePref, homeURL);
                win.BrowserHome();
                win.BrowserCommands.home();
              };
              const notificationBox = win.gBrowser.getNotificationBox();
              notificationBox.appendNotification(
+2 −1
Original line number Diff line number Diff line
@@ -296,6 +296,7 @@ export const BrowserWindowTracker = {
    args = null,
    remote = undefined,
    fission = undefined,
    skipCustomHome = false,
  } = {}) {
    let windowFeatures = "chrome,dialog=no,all";
    if (features) {
@@ -306,7 +307,7 @@ export const BrowserWindowTracker = {
      windowFeatures += ",private";
      if (
        (!args && !lazy.PrivateBrowsingUtils.permanentPrivateBrowsing) ||
        args?.private === "no-home"
        skipCustomHome
      ) {
        // Force the new window to load about:privatebrowsing instead of the
        // default home page.