Bug 1721858 - Enable WebSocket connection partitioning if first party isolation is enabled. r=nhnt11

Differential Revision: https://phabricator.services.mozilla.com/D120742
This commit is contained in:
Paul Zuehlcke 2021-07-29 08:10:38 +00:00
parent 0555901c81
commit d64a25c382

View File

@ -488,7 +488,8 @@ class nsWSAdmissionManager {
int32_t IndexOf(nsCString& aAddress, nsCString& aOriginSuffix) {
for (uint32_t i = 0; i < mQueue.Length(); i++) {
bool isPartitioned =
StaticPrefs::privacy_partition_network_state() &&
(StaticPrefs::privacy_partition_network_state() ||
StaticPrefs::privacy_firstparty_isolate()) &&
StaticPrefs::privacy_partition_network_state_ws_connection_queue();
if (aAddress == (mQueue[i])->mAddress &&
(!isPartitioned || aOriginSuffix == (mQueue[i])->mOriginSuffix)) {