Bug 1838415 - Introduce RFPTarget::NavigatorConnection. r=tjr

Differential Revision: https://phabricator.services.mozilla.com/D181202
This commit is contained in:
Tom Schuster 2023-06-21 07:01:23 +00:00
Родитель d81a2da322
Коммит d25d725db1
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1840,7 +1840,7 @@ network::Connection* Navigator::GetConnection(ErrorResult& aRv) {
}
mConnection = network::Connection::CreateForWindow(
mWindow, nsGlobalWindowInner::Cast(mWindow)->ShouldResistFingerprinting(
RFPTarget::Unknown));
RFPTarget::NavigatorConnection));
}
return mConnection;

Просмотреть файл

@ -141,9 +141,8 @@ class NotifyRunnable : public WorkerRunnable {
/* static */
already_AddRefed<ConnectionWorker> ConnectionWorker::Create(
WorkerPrivate* aWorkerPrivate, ErrorResult& aRv) {
bool shouldResistFingerprinting =
aWorkerPrivate->GlobalScope()->ShouldResistFingerprinting(
RFPTarget::Unknown);
bool shouldResistFingerprinting = aWorkerPrivate->ShouldResistFingerprinting(
RFPTarget::NavigatorConnection);
RefPtr<ConnectionWorker> c = new ConnectionWorker(shouldResistFingerprinting);
c->mProxy = ConnectionProxy::Create(aWorkerPrivate, c);
if (!c->mProxy) {

Просмотреть файл

@ -59,6 +59,7 @@ ITEM_VALUE(WidgetEvents, 1llu << 35)
ITEM_VALUE(MediaDevices, 1llu << 36)
ITEM_VALUE(MediaCapabilities, 1llu << 37)
ITEM_VALUE(AudioSampleRate, 1llu << 38)
ITEM_VALUE(NavigatorConnection, 1llu << 39)
// !!! Don't forget to update kDefaultFingerintingProtections in nsRFPService.cpp
// if necessary.