• Nicolas Ouellet-Payeur's avatar
    [Sync] Fix a crash in StopSyncHelperOnModelThread() · 19ba8fcb
    Nicolas Ouellet-Payeur authored
    This is a new crash with the DestroyProfileOnBrowserClose experiment
    (go/destroy-profile-on-browser-close). The BookmarkSyncService uses a
    ProxyModelTypeControllerDelegate, with the UI thread as the model
    thread. This causes issues, where posted tasks run _after_ the
    BookmarkSyncService gets deleted.
    
    This patch switches it to a ForwardingModelTypeControllerDelegate,
    so the tasks run synchronously instead of posting to the UI thread. This
    fixes teardown order.
    
    Bug: 1140232, 88586
    Change-Id: I0802334ce3da56326c167f7951d512fe045ddece
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2487222
    Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#820229}
    19ba8fcb
BUILD.gn 4.75 KB