Skip to content
Commit 131982a2 authored by Mikel Astiz's avatar Mikel Astiz Committed by Chromium LUCI CQ
Browse files

[sync] Post task when registering synthetic trials

SyncClient's implementation can run into an infinite recursion if
`RegisterTrustedVaultAutoUpgradeSyntheticFieldTrial()` leads to
exercising the factory that constructs SyncServiceImpl.

This scenario is known to be reachable on iOS as per linked bug, so the
safest and most future-proof approach is to use task-posting to slightly
delay the registration of synthetic field trials, which guarantees that
the construction of SyncService is completed at the time.

Change-Id: I0c0ed22fdce2479e444640caad1c896a7d4021ea
Fixed: 345514506
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5607959


Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: default avatarAnkush Singh <ankushkush@google.com>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1312774}
parent 1d152a81
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment