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

Issue 2856913007: [Sync] Handle reassociation of tabs where the old tab is already mapped. (Closed)

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

Description

[Sync] Handle reassociation of tabs where the old tab is already mapped. If ReassociateLocalTab is called with a tab node that is already mapped to a tab, it's possible to wind up with the synced session tracker holding two tab objects referring to the same tab id. This can lead to memory corruption. This CL makes the tracker defensive against that scenario, and adds some more data verification in the unit tests BUG=714524, 639009 Review-Url: https://codereview.chromium.org/2856913007 Cr-Commit-Position: refs/heads/master@{#469553} Committed: https://chromium.googlesource.com/chromium/src/+/783900c29c6242e65191a8951e12ce45c739571e

Patch Set 1 #

Total comments: 14

Patch Set 2 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -45 lines) Patch
M components/sync_sessions/sessions_sync_manager.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M components/sync_sessions/sessions_sync_manager_unittest.cc View 2 chunks +20 lines, -1 line 0 comments Download
M components/sync_sessions/synced_session_tracker.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M components/sync_sessions/synced_session_tracker.cc View 1 1 chunk +49 lines, -12 lines 0 comments Download
M components/sync_sessions/synced_session_tracker_unittest.cc View 1 22 chunks +217 lines, -29 lines 0 comments Download

Messages

Total messages: 17 (12 generated)
Nicolas Zea
PTAL
3 years, 7 months ago (2017-05-04 19:24:20 UTC) #7
skym
lgtm https://codereview.chromium.org/2856913007/diff/1/components/sync_sessions/synced_session_tracker.cc File components/sync_sessions/synced_session_tracker.cc (right): https://codereview.chromium.org/2856913007/diff/1/components/sync_sessions/synced_session_tracker.cc#newcode412 components/sync_sessions/synced_session_tracker.cc:412: tab_ptr = old_tab_iter->second; Is it possible this assigns ...
3 years, 7 months ago (2017-05-04 20:07:21 UTC) #8
Nicolas Zea
Comments addressed. https://codereview.chromium.org/2856913007/diff/1/components/sync_sessions/synced_session_tracker.cc File components/sync_sessions/synced_session_tracker.cc (right): https://codereview.chromium.org/2856913007/diff/1/components/sync_sessions/synced_session_tracker.cc#newcode412 components/sync_sessions/synced_session_tracker.cc:412: tab_ptr = old_tab_iter->second; On 2017/05/04 20:07:20, skym ...
3 years, 7 months ago (2017-05-04 23:36:15 UTC) #10
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/2856913007/20001
3 years, 7 months ago (2017-05-04 23:37:06 UTC) #14
commit-bot: I haz the power
3 years, 7 months ago (2017-05-05 00:47:07 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/783900c29c6242e65191a8951e12...

Powered by Google App Engine
This is Rietveld 408576698