Chromium Code Reviews
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}
(cherry picked from commit babffd17e43935e30657dcfda02d962791adf460)
Review-Url: https://codereview.chromium.org/2818803003 .
Cr-Commit-Position: refs/branch-heads/3029@{#698}
Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471}
Committed: https://chromium.googlesource.com/chromium/src/+/c9c3186627372f19063b9855a2176150567a5889
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
|||||||||||||||||||