New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640625 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
OOO until Feb 4th
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

Document mode migration from M50 to M54 does not preserve tabs

Project Member Reported by wnwen@chromium.org, Aug 24 2016

Issue description

Install M50 apk
Open some document mode tabs
- Tab state files in app_ChromeDocumentActivity

Install -r tip of tree M54 apk
Tabs get migrated to app_tabs/0/
- tab196, tab197, tab_state (just contains new tab), tab_state0 (contains no tabs).
Open Clankium
- Tab files get wiped and end up with new tab page
- left with tab198, tab_state0 (updated)

Not caused by latest CL, regression at an earlier point. Investigating.
 

Comment 1 by wnwen@chromium.org, Aug 24 2016

Figured out root cause, tab_state file is not deleted, so legacy migration task runs (if it has not run before) and replaces tab_state0 with tab_state (which only contained the new tab), or the new multi-instance migration runs which overwrites tab_state0 with tab_state.
Cc: twelling...@chromium.org
Well, I figured this would happen with multiple migration pathways happening.  The document mode migration tests didn't account for that.

Comment 3 by wnwen@chromium.org, Aug 24 2016

Status: Started (was: Assigned)
Adding this to tests and fix on the way. Will have to be merged into M53 as the other migration code for tab_state0 is in M53.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9df9c7815b45e142c29162e02ddcdd8f411ec703

commit 9df9c7815b45e142c29162e02ddcdd8f411ec703
Author: wnwen <wnwen@chromium.org>
Date: Wed Aug 24 23:21:13 2016

Fix document mode migration.

There is an old tab_state file in the tabbed mode state directory. If
it is not deleted and the new tab state is written to the new
tab_state0 file, then when it comes time to run the migration code in
TabPersistentStore the old tab_state file will be given preference
and overwrite the new one with all the document mode tabs that were
just migrated. Thus we need to delete the old tab_state file if it
exists.

BUG= 640625 

Review-Url: https://codereview.chromium.org/2274943002
Cr-Commit-Position: refs/heads/master@{#414194}

[modify] https://crrev.com/9df9c7815b45e142c29162e02ddcdd8f411ec703/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/DocumentModeAssassin.java
[modify] https://crrev.com/9df9c7815b45e142c29162e02ddcdd8f411ec703/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/DocumentModeAssassinTest.java

Comment 5 by wnwen@chromium.org, Aug 25 2016

Labels: Merge-Request-53
Merging fix in #4 for users updating to M53 from <M51.

Comment 6 by wnwen@chromium.org, Aug 25 2016

Status: Fixed (was: Started)

Comment 7 by dimu@chromium.org, Aug 25 2016

Labels: -Merge-Request-53 Merge-Review-53 Hotlist-Merge-Review
[Automated comment] Less than 2 weeks to go before stable on M53, manual review required.
Labels: -Merge-Review-53 Merge-Approved-53
Merge of c#4 approved for M53 branch 2785, please re-apply label if you need c#8 as well.
Project Member

Comment 10 by sheriffbot@chromium.org, Aug 29 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by bugdroid1@chromium.org, Aug 29 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/07d0458654375ff59c8b592ddd86c667587de678

commit 07d0458654375ff59c8b592ddd86c667587de678
Author: Peter Wen <wnwen@google.com>
Date: Mon Aug 29 13:17:59 2016

Fix document mode migration.

There is an old tab_state file in the tabbed mode state directory. If
it is not deleted and the new tab state is written to the new
tab_state0 file, then when it comes time to run the migration code in
TabPersistentStore the old tab_state file will be given preference
and overwrite the new one with all the document mode tabs that were
just migrated. Thus we need to delete the old tab_state file if it
exists.

BUG= 640625 

Review-Url: https://codereview.chromium.org/2274943002
Cr-Commit-Position: refs/heads/master@{#414194}
(cherry picked from commit 9df9c7815b45e142c29162e02ddcdd8f411ec703)

Review URL: https://codereview.chromium.org/2290633002 .

Cr-Commit-Position: refs/branch-heads/2785@{#777}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/07d0458654375ff59c8b592ddd86c667587de678/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/DocumentModeAssassin.java
[modify] https://crrev.com/07d0458654375ff59c8b592ddd86c667587de678/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/DocumentModeAssassinTest.java

Sign in to add a comment