mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1695050 - Part 9: Update the call-site of CookieJarSettings::Create() for WebExecutorSupport. r=esawin
The WebExecutorSupport::CreateStreamLoader() would need the cookieJarSettings. This patch updates the call-site to pass the correct enum according to the fact that if the request from the private mode. Differential Revision: https://phabricator.services.mozilla.com/D109052
This commit is contained in:
parent
5a8c1b586c
commit
025dcb0651
@ -381,14 +381,15 @@ nsresult WebExecutorSupport::CreateStreamLoader(
|
||||
channel->SetLoadFlags(nsIRequest::LOAD_ANONYMOUS);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsICookieJarSettings> cookieJarSettings;
|
||||
if (aFlags & java::GeckoWebExecutor::FETCH_FLAGS_PRIVATE) {
|
||||
nsCOMPtr<nsIPrivateBrowsingChannel> pbChannel = do_QueryInterface(channel);
|
||||
NS_ENSURE_TRUE(pbChannel, NS_ERROR_FAILURE);
|
||||
pbChannel->SetPrivate(true);
|
||||
cookieJarSettings = CookieJarSettings::Create(CookieJarSettings::ePrivate);
|
||||
} else {
|
||||
cookieJarSettings = CookieJarSettings::Create(CookieJarSettings::eRegular);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsICookieJarSettings> cookieJarSettings =
|
||||
CookieJarSettings::Create();
|
||||
MOZ_ASSERT(cookieJarSettings);
|
||||
|
||||
nsCOMPtr<nsILoadInfo> loadInfo = channel->LoadInfo();
|
||||
|
Loading…
Reference in New Issue
Block a user