Closed Bug 1556881 Opened 4 months ago Closed 2 months ago

Don't assume the pref is live


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




Tracking Status
firefox70 --- fixed


(Reporter: ehsan, Assigned: ehsan)




(1 file)

Here: we read the value of the pref at startup only once and never update it again. This affects e.g. what window.localStorage returns.

However we have tests in the tree like which are written as if were a live pref!

Is this pref not being live intentional? Can we convert it into a live pref so that these tests actually test the thing they think they are testing rather than a combination of the new/old LS backends?

Flags: needinfo?(jvarga)
Flags: needinfo?(amarchesini)

It's intentional. It would be really hard to make it a live pref.

Flags: needinfo?(jvarga)

Interesting! So attempting to set this pref inside a browser-chrome test is completely broken, right? I see inside the debugger that the code is instantiating the old LS backend while the test is thinking the new backend is being tested...

Blocks: 1556812

I was thinking we might be able to make it work via nsIQuotaManagerService::Reset()

Andrew, do you have time to work on it?

Flags: needinfo?(amarchesini) → needinfo?(bugmail)
Component: DOM: Core & HTML → DOM: Web Storage
Type: defect → enhancement
Priority: -- → P5

We talked about this at the all hands and decided to morph the bug into fixing our test to not assume the pref is live.

Assignee: nobody → ehsan
Flags: needinfo?(bugmail)
Summary: pref isn't live, but tests depend on it being so → Don't assume the pref is live
Component: DOM: Web Storage → Privacy: Anti-Tracking
Priority: P5 → P3
Pushed by
Fix browser_partitionedLocalStorage_events.js to not assume the pref is live; r=baku
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.