Description[Sync] Restrict types to configure to only include registered types
The issue is that the set of datatypes requested for configuration doesn't
match the set of update handlers registered with ModelTypeRegistry. This causes
segfault. The reason for it is that the types to configure are decided at the
time of configuration call in DataTypeManagerImpl on UI thread, while update
handlers are settled at the time of sync cycle execution (couple of posts on
sync thread later). Some update handlers can get unregistered by this time (the
bug has a description of scenario that can lead to this issue). This issue is
only applicable to configuration sync cycle since during normal sync cycle set
of datatypes is derived from ModelTypeRegistry.
The fix is to remove unregistered types from types to configure in
Syncer::ConfigureSyncShare.
BUG=703253
R=skym@chromium.org
Review-Url: https://codereview.chromium.org/2804743004
Cr-Commit-Position: refs/heads/master@{#462727}
Committed: https://chromium.googlesource.com/chromium/src/+/e71ec0e8a8645902a8d45a9f0fc9b46aaea6c264
Patch Set 1 #
Total comments: 4
Patch Set 2 : Address comments, adjust unittest. #
Messages
Total messages: 17 (12 generated)
|