Description[Document mode] Keep tab ID list in sync with Tab entries
It is possible to have one DocumentActivity create a Tab and add its ID to the
DocumentTabModel, but get interrupted (somehow) before the Tab Entry is added
to the DocumentTabModel. This results in getCount() returning the correct number
of Tabs that exist but fail to have any information about the new Tab, resulting
in getTabAt() returning |null|. We should instead keep the ID list and the Entry
list be as in sync as possible, adding the Entry directly to the DocumentTabModel
as soon as we let the DocumentTabModel know about the Tab's existence.
Add new methods to tie the addTabId and updateEntry functions together via addTab,
deprecate the old ones, and assert that we should never get into a bad state.
Deprecated methods will be culled when the downstream patch lands.
BUG=457427
Committed: https://crrev.com/7710ef5ff57f581f66dbbaad2dffe8c4a9048add
Cr-Commit-Position: refs/heads/master@{#318576}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Deprecated #
Messages
Total messages: 13 (5 generated)
|