Commit 0f94a397 authored by zea@chromium.org's avatar zea@chromium.org

[Sync] Don't DCHECK if we can't find the window for a tab

If the model association happens at the right time (i.e. when a tab is being
dragged from one window to another), the tab strip model may be out of date.
Just handle this gracefully for now and return false.

BUG=282590
TBR=haitao@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238338 0039d316-1c4b-4281-b951-d872f2087c98
parent 9b966196
...@@ -47,7 +47,8 @@ bool BrowserSyncedWindowDelegate::IsTabPinned( ...@@ -47,7 +47,8 @@ bool BrowserSyncedWindowDelegate::IsTabPinned(
if (tab == current) if (tab == current)
return browser_->tab_strip_model()->IsTabPinned(i); return browser_->tab_strip_model()->IsTabPinned(i);
} }
NOTREACHED(); // The window and tab are not always updated atomically, so it's possible
// one of the values was stale. We'll retry later, just ignore for now.
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment