Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit c887251

Browse files
fix allow list crash (#3945)
Task/Issue URL: https://app.asana.com/0/1204186595873227/1209345938720177 Tech Design URL: CC: **Description**: Improves concurrency problems where allowlist is modified or deallocated while in use in the contentBlockerRulesLists getter. This is a quick fix for the release branch, but we should follow up with making allowlist thread safe in BSK
1 parent f9313ea commit c887251

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Core/ContentBlockerRulesLists.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public final class ContentBlockerRulesLists: DefaultContentBlockerRulesListsSour
3434
if adClickAttribution.isEnabled,
3535
let tdsRulesIndex = result.firstIndex(where: { $0.name == Constants.trackerDataSetRulesListName }) {
3636
let tdsRules = result[tdsRulesIndex]
37-
let allowlistedTrackerNames = adClickAttribution.allowlist.map { $0.entity }
37+
let allowlist = adClickAttribution.allowlist
38+
let allowlistedTrackerNames = allowlist.map { $0.entity }
3839
let splitter = AdClickAttributionRulesSplitter(rulesList: tdsRules, allowlistedTrackerNames: allowlistedTrackerNames)
3940
if let splitRules = splitter.split() {
4041
result.remove(at: tdsRulesIndex)

0 commit comments

Comments
 (0)