Skip to content

Commit 9a0bd3b

Browse files
authored
fix: enhanced tracking protection resets on restart (#292)
1 parent 2adecef commit 9a0bd3b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/browser/components/protections/ContentBlockingPrefs.sys.mjs b/browser/components/protections/ContentBlockingPrefs.sys.mjs
2+
index 466372ffbf..a862ae4d69 100644
3+
--- a/browser/components/protections/ContentBlockingPrefs.sys.mjs
4+
+++ b/browser/components/protections/ContentBlockingPrefs.sys.mjs
5+
@@ -424,10 +424,12 @@ export let ContentBlockingPrefs = {
6+
},
7+
8+
updateCBCategory(preserveAllowListSettings = true) {
9+
- if (
10+
- this.switchingCategory ||
11+
- !Services.prefs.prefHasUserValue(this.PREF_CB_CATEGORY)
12+
- ) {
13+
+ if (this.switchingCategory) {
14+
+ return;
15+
+ }
16+
+
17+
+ let prefType = Services.prefs.getPrefType(this.PREF_CB_CATEGORY);
18+
+ if (prefType == Services.prefs.PREF_INVALID) {
19+
return;
20+
}
21+
// Turn on switchingCategory flag, to ensure that when the individual prefs that change as a result

0 commit comments

Comments
 (0)