Repository: puppeteer/puppeteer
File: packages/puppeteer-core/src/node/FirefoxLauncher.ts (TypeScript)

Code before:
      return ['-profile', '--profile'].includes(arg);
    });

    if (profileArgIndex !== -1) {
      userDataDir = firefoxArguments[profileArgIndex + 1];
      if (!userDataDir || !fs.existsSync(userDataDir)) {
        throw new Error(`Firefox profile not found at '${userDataDir}'`);
      }

      // When using a custom Firefox profile it needs to be populated
      // with required preferences.
      isTempUserDataDir = false;
    } else {
      userDataDir = await mkdtemp(this.getProfilePath());
      firefoxArguments.push('--profile');
      firefoxArguments.push(userDataDir);
    }

    await createProfile(SupportedBrowsers.FIREFOX, {
      path: userDataDir,
      preferences: {
        ...extraPrefsFirefox,
        ...(options.protocol === 'cdp'
          ? {
              // Temporarily force disable BFCache in parent (https://bit.ly/bug-1732263)
              'fission.bfcacheInParent': false,
            }
          : {}),
        // Force all web content to use a single content process. TODO: remove
        // this once Firefox supports mouse event dispatch from the main frame
        // context. Once this happens, webContentIsolationStrategy should only
        // be set for CDP.
        'fission.webContentIsolationStrategy': 0,
      },
    });

    let firefoxExecutable: string;
    if (this.puppeteer._isPuppeteerCore || executablePath) {
      assert(
        executablePath,
        `An \`executablePath\` must be specified for \`puppeteer-core\``
      );
      firefoxExecutable = executablePath;
    } else {
      firefoxExecutable = this.executablePath();
    }

    return {
      isTempUserDataDir,
      userDataDir,
      args: firefoxArguments,

Review comment (suggestion):
We should still be able to get rid of this preference given that it doesn't affect the isolation feature.

Code after:
      return ['-profile', '--profile'].includes(arg);
    });

    if (profileArgIndex !== -1) {
      userDataDir = firefoxArguments[profileArgIndex + 1];
      if (!userDataDir || !fs.existsSync(userDataDir)) {
        throw new Error(`Firefox profile not found at '${userDataDir}'`);
      }

      // When using a custom Firefox profile it needs to be populated
      // with required preferences.
      isTempUserDataDir = false;
    } else {
      userDataDir = await mkdtemp(this.getProfilePath());
      firefoxArguments.push('--profile');
      firefoxArguments.push(userDataDir);
    }

    await createProfile(SupportedBrowsers.FIREFOX, {
      path: userDataDir,
      preferences: {
        ...extraPrefsFirefox,
        ...(options.protocol === 'cdp'
          ? {
              // Temporarily force disable BFCache in parent (https://bit.ly/bug-1732263)
              'fission.bfcacheInParent': false,
            }
          : {}),
        // Force all web content to use a single content process. TODO: remove
        // this once Firefox supports mouse event dispatch from the main frame
        // context. Once this happens, webContentIsolationStrategy should only
        // be set for CDP. See
        // https://bugzilla.mozilla.org/show_bug.cgi?id=1773393
        'fission.webContentIsolationStrategy': 0,
      },
    });

    let firefoxExecutable: string;
    if (this.puppeteer._isPuppeteerCore || executablePath) {
      assert(
        executablePath,
        `An \`executablePath\` must be specified for \`puppeteer-core\``
      );
      firefoxExecutable = executablePath;
    } else {
      firefoxExecutable = this.executablePath();
    }

    return {
      isTempUserDataDir,
      userDataDir,