Closed Bug 1825250 Opened 2 years ago Closed 2 years ago

nsRFPService::IsRFPEnabledFor should be more efficient with RPF lite enabled

Categories

(Core :: Security, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: tschuster, Assigned: tschuster)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Right now we have some "efficiency checks" that just call nsContentUtils::ShouldResistFingerprinting without any context. With RFP lite enabled that code will involves three array searches. While all of these arrays are going to be smallish, we should optimize this to be constant time.

Apart from that we should consider if all those efficiency checks are actually faster than checking the cached results on Document.

Assignee: nobody → tschuster

Depends on D176297

Attachment #9329961 - Attachment description: WIP: Bug 1825250 - Change RFPTarget into bit-flags. → Bug 1825250 - Change RFPTarget into bit-flags. r?tjr

The boolean is used to initialize WorkerGlobalScopeBase::mShouldResistFingerprinting which is similar
in its behavior to the precomputed mShouldResistFingerprinting in Document.

Depends on D176298

Pushed by tschuster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c366df5cc857 Remove the enum value RFPTarget::IgnoreTargetAndReturnCachedValue and instead indicate changes as a return value. r=emilio https://hg.mozilla.org/integration/autoland/rev/47ed8ace33b0 Change RFPTarget into bit-flags. r=tjr https://hg.mozilla.org/integration/autoland/rev/f4fc1d8e910f Consider WorkerLoadInfo::mShouldResistFingerprinting as precomputed. r=tjr
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: