Bug 1695050 - Part 8: Update the call-site of CookieJarSettings::Create() for WebBrowserPersist. r=smaug

This patch updates the call-site in WebBrowserPersist to pass the
correct enum according to if it is in the private browsing mode.

Differential Revision: https://phabricator.services.mozilla.com/D109051
This commit is contained in:
Tim Huang 2021-03-29 11:01:53 +00:00
parent 38c07544f4
commit 5a8c1b586c

View File

@ -1347,7 +1347,10 @@ nsresult nsWebBrowserPersist::SaveURIInternal(
// current state of the prefs/permissions.
nsCOMPtr<nsICookieJarSettings> cookieJarSettings = aCookieJarSettings;
if (!cookieJarSettings) {
cookieJarSettings = mozilla::net::CookieJarSettings::Create();
cookieJarSettings =
aIsPrivate
? net::CookieJarSettings::Create(net::CookieJarSettings::ePrivate)
: net::CookieJarSettings::Create(net::CookieJarSettings::eRegular);
}
// Open a channel to the URI