Chromium Code Reviews| Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| index 5c8ae2881898f1a981237b2dc8184a6e5eb154b4..704e5f276bc898f75f88b6cb3728f5d0c1cf822c 100644 |
| --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| @@ -750,7 +750,11 @@ Browser* StartupBrowserCreatorImpl::RestoreOrCreateBrowser( |
| &StartupBrowserCreator::in_synchronous_profile_launch_, true); |
| // OpenTabsInBrowser requires at least one tab be passed. As a fallback to |
| - // prevent a crash, use the NTP if |tabs| is empty. |
| + // prevent a crash, use the NTP if |tabs| is empty. This shouldn't happen, |
| + // but could indicate an inconsistency where, e.g., we expected a session |
| + // restore to happen but it did not occur/succeed. This has been observed when |
| + // launching Chrome with the kRestoreLastSession switch, using a profile that |
| + // does not normally restore, when a Chrome process is already running. |
|
Peter Kasting
2016/11/02 17:54:51
I'm concerned with "this shouldn't happen" (which
tmartino
2016/11/02 18:04:40
Hmm, I can certainly take a look at stepping throu
Peter Kasting
2016/11/02 18:05:47
Right, I'm wondering if the fix is "detect that th
tmartino
2017/02/03 23:44:11
Spent about a day on this and wanted to close the
|
| browser = OpenTabsInBrowser( |
| browser, process_startup, |
| (tabs.empty() |