Closed Bug 1770403 Opened 3 years ago Closed 3 years ago

Remove overloading of mStorageAccessPermissionGranted on Window objects

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: bvandersloot, Assigned: bvandersloot)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

This variable caches a combination of the result of ShouldAllowAccessFor and the result of requesting storage access. We should disentangle these.

mStorageAccessPermissionGranted was initialized to ShouldAllowAccessFor(...).
This had logic that has nothing to do with this the permission being granted.
A few bugs with my helpers were covered up by this default value, so I fixed the helpers in the same patch here.

This also required adding a new helper to the RejectForeignAllowList and exposing it to the Document.cpp file.
I'm not enthused about making that available, but we don't have a good component boundary for now, so I don't hate it.
Ideally the implementation of the rSA and hSA funcitons (and the like) would be in our component, but that is outside of this change's scope.

Assignee: nobody → bvandersloot
Status: NEW → ASSIGNED

With the use of mStorageAccessPermissionGranted reduced to a single meaning, it turns out to be entirely redundant with the variable on the inner window.

Depends on D147867

Pushed by bvandersloot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df452028881c part 1 - Change initialization of mStorageAccessPermissionGranted on outer window, r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/a11f5453e441 part 2 - Remove mStorageAccessPermissionGranted from the outer window, r=anti-tracking-reviewers,timhuang
Pushed by bvandersloot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7d8147ba25e8 part 1 - Change initialization of mStorageAccessPermissionGranted on outer window, r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/9cf02ec5657a part 2 - Remove mStorageAccessPermissionGranted from the outer window, r=anti-tracking-reviewers,timhuang

Backed out 5 changesets (Bug 1765313, Bug 1770403) for causing bc failures on browser_storageAccessPrivilegeAPI.js.
Backout link
Push with failures <--> bc3
Failure Log

Flags: needinfo?(bvandersloot)

The fix for /storage-access-api/requestStorageAccess.sub.window.html caused this failure. I edited D147867 to resolve this.

I also re-tested locally, both browser chrome tests and wpt.

Flags: needinfo?(bvandersloot)
Pushed by bvandersloot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9e5ed810427c part 1 - Change initialization of mStorageAccessPermissionGranted on outer window, r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/1723828ce4bb part 2 - Remove mStorageAccessPermissionGranted from the outer window, r=anti-tracking-reviewers,timhuang
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
Regressions: 1789401
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: