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

Issue 2810873005: [Sync] Always check the device info provider for being null before using it. (Closed)

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

Description

[Sync] Always check the device info provider for being null before using it. During sign out, the DeviceInfoProviderImpl is reset before DeviceInfoSyncService is told we're shutting down, as well as in a separate task. This means if we get extremely unlucky, and a pulse is happening at just the right time, we'll try to use the provider after it's been destroyed. To fix this, we can just check that it's not nullptr before using it. The other usages of the provider in DeviceInfoSyncService have stronger guarantees from sync that we're not in shutdown yet, and as such they DCHECK instead. No unit tests were added as part of this change. It is non-trivial to force an asyc pulse, and we currently do not have good seams to allow this. Since this change needs to be merged back, I want this modification to be as small as possible. BUG=709927 Review-Url: https://codereview.chromium.org/2810873005 Cr-Commit-Position: refs/heads/master@{#463814} Committed: https://chromium.googlesource.com/chromium/src/+/babffd17e43935e30657dcfda02d962791adf460

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -5 lines) Patch
M components/sync/device_info/device_info_sync_service.cc View 1 chunk +11 lines, -5 lines 0 comments Download

Messages

Total messages: 13 (9 generated)
skym
PTAL
3 years, 8 months ago (2017-04-11 17:58:14 UTC) #4
pavely
lgtm
3 years, 8 months ago (2017-04-11 22:34: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/2810873005/1
3 years, 8 months ago (2017-04-11 22:36:46 UTC) #10
commit-bot: I haz the power
3 years, 8 months ago (2017-04-11 22:48:22 UTC) #13
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/babffd17e43935e30657dcfda02d...

Powered by Google App Engine
This is Rietveld 408576698