[iOS] Ensure content blocker compilation is initiated on the main thread (#31483)

WebKit APIs are main actor isolated by default and should be called from there. The Swift compiler should have executed this code anyways on main because of the `await` + `WK_SWIFT_UI_ACTOR` used but doesn't seem to be doing it correctly for WebKit async generated APIs.
This commit is contained in:
Kyle Hickinson
2025-09-29 15:09:59 -04:00
committed by GitHub
parent f96c195145
commit fcaae2f440
@@ -430,12 +430,10 @@ import os.log
)
do {
let ruleList = try await Task.detached {
return try await self.ruleStore.compileContentRuleList(
forIdentifier: identifier,
encodedContentRuleList: encodedContentRuleList
)
}.value
let ruleList = try await self.ruleStore.compileContentRuleList(
forIdentifier: identifier,
encodedContentRuleList: encodedContentRuleList
)
guard let ruleList = ruleList else { throw CompileError.noRuleListReturned }
Self.signpost.endInterval("compileRuleList", state)
return ruleList