Open Bug 1991526 Opened 7 days ago Updated 7 days ago

BTP should not initialize before `profile-after-change`

Categories

(Core :: Privacy: Anti-Tracking, task, P3)

task

Tracking

()

ASSIGNED

People

(Reporter: emz, Assigned: emz)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

BTP currently initializes lazily. This means when it gets called first it will init the singleton, storage, etc. This can happen before profile init, e.g. in the new profile manager we still seem to end up calling BounceTrackingProtection::RecordUserActivation when a user interacts with it. Initializing this early is not necessary.

We should keep BTP init lazy, but refuse to init when profile-after-change or a similar startup phase indicator has not fired yet.

This was discovered in Bug 1988015.

Assignee: nobody → emz
Status: NEW → ASSIGNED
Attachment #9517010 - Attachment description: Bug 1991526 - Prevent BTP from init before profile-after-change. r=#anti-tracking! → Bug 1991526 - Prevent BTP init before profile-after-change. r=#anti-tracking!

This change could give us small startup perf gains for scenarios where we e.g. go through the new profile manager. Right now we seem to (attempt to) init on user interaction with the profile manager. After the patch we should only init lazily after the profile has been initialized. It's a bit hard to quantify this potential gain though.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: