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

Issue 1146533005: [Sync] InvalidationService shouldn't CHECK when registering ObjectId for more than one handler (Closed)

Created:
5 years, 7 months ago by pavely
Modified:
5 years, 7 months ago
CC:
chromium-reviews, tim+watch_chromium.org, zea+watch_chromium.org, maxbogue+watch_chromium.org, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] InvalidationService shouldn't CHECK when registering ObjectId for more than one handler Before this change InvalidationService CHECKs that object id is only registered with one handler. This causes browser crash when object id is received from network already registered. Solution is to let each component that uses InvalidationService decide how to react to duplicate registration. In this change: - InvalidationService::UpdateRegisteredInvalidationIds doesn't CHECK inside, but returns boolean that indicates if update was successful. - All places that call this function do CHECK to preserve existing behavior. - Internal implementations and tests are updated accordingly. BUG=475941 R=maniscalco@chromium.org Committed: https://crrev.com/8131d2b4b0c296269c8f1bb8e0ed9dfbd5e852ba Cr-Commit-Position: refs/heads/master@{#330654}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed Nick's comments. Fixed build. #

Patch Set 3 : Fix android build. #

Patch Set 4 : Fix one more compile error. #

Total comments: 3

Patch Set 5 : Addressed comments from Bartosz. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -134 lines) Patch
M chrome/browser/drive/drive_notification_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/invalidation/fake_invalidation_service.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/invalidation/fake_invalidation_service.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_invalidator.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_invalidator.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/policy/cloud/remote_commands_invalidator.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.cc View 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/sync/test/integration/fake_server_invalidation_service.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/test/integration/fake_server_invalidation_service.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M components/invalidation/fake_invalidator.h View 1 chunk +1 line, -1 line 0 comments Download
M components/invalidation/fake_invalidator.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/invalidation/invalidation_notifier.h View 1 chunk +1 line, -1 line 0 comments Download
M components/invalidation/invalidation_notifier.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M components/invalidation/invalidation_service.h View 1 chunk +3 lines, -3 lines 0 comments Download
M components/invalidation/invalidation_service_android.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M components/invalidation/invalidation_service_android.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M components/invalidation/invalidation_service_test_template.h View 1 7 chunks +36 lines, -10 lines 0 comments Download
M components/invalidation/invalidator.h View 1 chunk +4 lines, -3 lines 0 comments Download
M components/invalidation/invalidator_registrar.h View 1 chunk +3 lines, -3 lines 0 comments Download
M components/invalidation/invalidator_registrar.cc View 1 3 chunks +10 lines, -8 lines 0 comments Download
M components/invalidation/invalidator_registrar_unittest.cc View 2 chunks +2 lines, -39 lines 0 comments Download
M components/invalidation/invalidator_test_template.h View 7 chunks +34 lines, -9 lines 0 comments Download
M components/invalidation/non_blocking_invalidator.h View 1 chunk +1 line, -1 line 0 comments Download
M components/invalidation/non_blocking_invalidator.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M components/invalidation/p2p_invalidation_service.h View 1 chunk +1 line, -1 line 0 comments Download
M components/invalidation/p2p_invalidation_service.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/invalidation/p2p_invalidator.h View 1 chunk +1 line, -1 line 0 comments Download
M components/invalidation/p2p_invalidator.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M components/invalidation/ticl_invalidation_service.h View 1 chunk +1 line, -1 line 0 comments Download
M components/invalidation/ticl_invalidation_service.cc View 4 chunks +12 lines, -14 lines 0 comments Download
M sync/tools/sync_client.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sync/tools/sync_listen_notifications.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (5 generated)
pavely
5 years, 7 months ago (2015-05-16 00:01:22 UTC) #1
maniscalco
Just a few comments. What's the plan for updating the call sites to do something ...
5 years, 7 months ago (2015-05-18 15:42:28 UTC) #2
pavely
PTAL. > What's the plan for updating the call sites to do something smarter than ...
5 years, 7 months ago (2015-05-18 18:38:05 UTC) #3
maniscalco
LGTM https://codereview.chromium.org/1146533005/diff/1/components/invalidation/invalidator_registrar.cc File components/invalidation/invalidator_registrar.cc (right): https://codereview.chromium.org/1146533005/diff/1/components/invalidation/invalidator_registrar.cc#newcode50 components/invalidation/invalidator_registrar.cc:50: DVLOG(0) << "Duplicate registration: trying to register " ...
5 years, 7 months ago (2015-05-18 18:56:06 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1146533005/20001
5 years, 7 months ago (2015-05-18 18:58:58 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_compile_dbg/builds/17495) linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 7 months ago (2015-05-18 20:12:26 UTC) #8
pavely
Adding reviewers for call sites. Guys, PTAL. kinaba@: chrome/browser/drive/drive_notification_manager.cc bartfab@: chrome/browser/policy/cloud/*
5 years, 7 months ago (2015-05-18 20:53:49 UTC) #10
kinaba
> kinaba@: chrome/browser/drive/drive_notification_manager.cc lgtm
5 years, 7 months ago (2015-05-19 01:59:10 UTC) #11
bartfab (slow)
https://codereview.chromium.org/1146533005/diff/60001/chrome/browser/policy/cloud/cloud_policy_invalidator.cc File chrome/browser/policy/cloud/cloud_policy_invalidator.cc (right): https://codereview.chromium.org/1146533005/diff/60001/chrome/browser/policy/cloud/cloud_policy_invalidator.cc#newcode311 chrome/browser/policy/cloud/cloud_policy_invalidator.cc:311: CHECK(invalidation_service_->UpdateRegisteredInvalidationIds(this, ids)); Nit 1: #include "base/logging.h" Nit 2: I ...
5 years, 7 months ago (2015-05-19 10:44:43 UTC) #12
pavely
https://codereview.chromium.org/1146533005/diff/60001/chrome/browser/policy/cloud/cloud_policy_invalidator.cc File chrome/browser/policy/cloud/cloud_policy_invalidator.cc (right): https://codereview.chromium.org/1146533005/diff/60001/chrome/browser/policy/cloud/cloud_policy_invalidator.cc#newcode311 chrome/browser/policy/cloud/cloud_policy_invalidator.cc:311: CHECK(invalidation_service_->UpdateRegisteredInvalidationIds(this, ids)); On 2015/05/19 10:44:42, bartfab wrote: > Nit ...
5 years, 7 months ago (2015-05-19 17:54:56 UTC) #13
bartfab (slow)
policy lgtm
5 years, 7 months ago (2015-05-19 22:19:13 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1146533005/80001
5 years, 7 months ago (2015-05-19 22:52:26 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 7 months ago (2015-05-20 00:27:16 UTC) #18
commit-bot: I haz the power
5 years, 7 months ago (2015-05-20 00:28:48 UTC) #19
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/8131d2b4b0c296269c8f1bb8e0ed9dfbd5e852ba
Cr-Commit-Position: refs/heads/master@{#330654}

Powered by Google App Engine
This is Rietveld 408576698