Closed Bug 1731999 Opened 3 years ago Closed 2 years ago

Enable partitioned service worker for third-party contexts in dFPI

Categories

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

task

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: timhuang, Assigned: timhuang)

References

Details

Attachments

(4 files)

To enable partitioned Service Worker, we need to check the following functions

  • ClientSource::WindowExecutionReady()
  • ServiceWorkerContainer::GetGlobalIfValid()
  • ServiceWorkerInterceptController::ShouldPrepareForIntercept()
  • ServiceWorkerManager::IsAvailable()

This patch adds a pref to contorl unconditional partitioned service
worker in dFPI.

Assignee: nobody → tihuang
Status: NEW → ASSIGNED

This patch enables partitioned service workers in third-party contexts.
Doesn't like before, we will allow service workers to be registered even
the third-party contexts don't have storage access and the registered
service workers will be partitioned by the top-level site.

You can control this by using the pref 'privacy.partition.serviceWorkers'.
Setting this to true will enable the partitioning, otherwise, it will
still use the old behavior.

Depends on D131787

Pushed by tihuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf681adbb94e
Part 1: Add a pref 'privacy.partition.serviceWorkers'. r=pbz
https://hg.mozilla.org/integration/autoland/rev/92ef329677c9
Part 2: Use regular principal for service workers if pref 'privacy.partition.serviceWorkers' is false. r=pbz
https://hg.mozilla.org/integration/autoland/rev/a9da62fe5889
Part 3: Enable partitioned service workers. r=pbz
https://hg.mozilla.org/integration/autoland/rev/adaa0619e07d
Part 4: Modify tests to tests partitioned service workers. r=pbz
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: