Commit 808a0ea
committed
Fix reload loop detector: move call after guard checks and synchronize WeakHashMap
- Move reloadLoopDetector.detectReloadLoop() after the userSetting and
IGNORE_CMP_SUFFIX early-return guards in PopUpFoundMessageHandlerPlugin
to prevent accumulating false state when autoconsent is disabled or for
-top frame rules.
- Wrap WeakHashMap with Collections.synchronizedMap() in
AutoconsentReloadLoopDetector to prevent ConcurrentModificationException
from concurrent access across IO dispatcher and WebView JS bridge threads.1 parent f2fae5f commit 808a0ea
2 files changed
Lines changed: 3 additions & 2 deletions
File tree
- autoconsent/autoconsent-impl/src/main/java/com/duckduckgo/autoconsent/impl
- handlers
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments