Description[Sync] Fix Session's handling of windows.
We previously made some false assumptions about the order of window id's, and
freed memory for windows inappropriately. This would lead to memory corruption,
usually seen in the form of accesses to bad TabNavigation objects in the
session model associator. This patch completely rewrites how
we handle synced windows. Because there's no real order to windows, we now
store them in a map. In addition, because tabs can be moved between windows
and we aren't explicitly told which windows were closed or which tabs were
closed, we now have explicit tracking of the usage of windows and tabs, coupled
with a garbage collection phase that frees those tabs/windows that weren't
used during the tracking (see SyncedSessionTracker::ResetSessionTracking and
CleanupSession methods).
Due to the change in how we store windows, the integration tests and the
sessions ui had to be modified, but the real changes are within the session
model associator and the synced session tracker. Also, undisabled a test
that should be working.
BUG=94124, 81104
TEST=unit_tests; Opening windows with valid tabs, waiting for sync, closing
those windows.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=103878
Patch Set 1 #Patch Set 2 : Rebase #Patch Set 3 : Fix perf tests #
Total comments: 10
Patch Set 4 : Address comments #Patch Set 5 : fix typo #
Total comments: 8
Patch Set 6 : Comments #
Total comments: 6
Patch Set 7 : Comment. #Patch Set 8 : Address comments #
Total comments: 52
Patch Set 9 : Refactor for clarity + address comments #Patch Set 10 : Fix test #
Total comments: 23
Patch Set 11 : Comments #
Total comments: 6
Patch Set 12 : Fix nits, rebase. #Messages
Total messages: 21 (0 generated)
|