Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Issue 2804743004: [Sync] Restrict types to configure to only include registered types (Closed)

Created:
3 years, 8 months ago by pavely
Modified:
3 years, 8 months ago
Reviewers:
skym
CC:
chromium-reviews, sync-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -13 lines) Patch
M components/sync/engine_impl/syncer.cc View 1 1 chunk +8 lines, -7 lines 0 comments Download
M components/sync/engine_impl/syncer_unittest.cc View 1 1 chunk +4 lines, -6 lines 0 comments Download

Messages

Total messages: 17 (12 generated)
pavely
3 years, 8 months ago (2017-04-06 20:22:39 UTC) #2
skym
lgtm Also would be nice to see a unit test. https://codereview.chromium.org/2804743004/diff/1/components/sync/engine_impl/syncer.cc File components/sync/engine_impl/syncer.cc (right): https://codereview.chromium.org/2804743004/diff/1/components/sync/engine_impl/syncer.cc#newcode82 ...
3 years, 8 months ago (2017-04-06 22:27:45 UTC) #6
pavely
https://codereview.chromium.org/2804743004/diff/1/components/sync/engine_impl/syncer.cc File components/sync/engine_impl/syncer.cc (right): https://codereview.chromium.org/2804743004/diff/1/components/sync/engine_impl/syncer.cc#newcode82 components/sync/engine_impl/syncer.cc:82: VLOG(1) << "Configuring types " << ModelTypeSetToString(request_types); On 2017/04/06 ...
3 years, 8 months ago (2017-04-06 23:48:26 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2804743004/20001
3 years, 8 months ago (2017-04-07 00:46:04 UTC) #14
commit-bot: I haz the power
3 years, 8 months ago (2017-04-07 01:15:52 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/e71ec0e8a8645902a8d45a9f0fc9...

Powered by Google App Engine
This is Rietveld 408576698