| Index: ios/chrome/browser/crash_report/crash_restore_helper.mm
|
| diff --git a/ios/chrome/browser/crash_report/crash_restore_helper.mm b/ios/chrome/browser/crash_report/crash_restore_helper.mm
|
| index 6a66ab781b8249714659792f9c02f3b4311bfa65..ad2b05f963ad6bad12ca8240ae26bedf3f1a5739 100644
|
| --- a/ios/chrome/browser/crash_report/crash_restore_helper.mm
|
| +++ b/ios/chrome/browser/crash_report/crash_restore_helper.mm
|
| @@ -288,19 +288,16 @@
|
| loadWindowFromPath:[self sessionBackupPath]
|
| forBrowserState:[_tabModel browserState]];
|
| DCHECK(window);
|
| - NSArray* sessions = window.sessions;
|
| - if (!sessions.count)
|
| + if (!window.unclaimedSessions)
|
| return;
|
| sessions::TabRestoreService* const tabRestoreService =
|
| IOSChromeTabRestoreServiceFactory::GetForBrowserState(_browserState);
|
| tabRestoreService->LoadTabsFromLastSession();
|
|
|
| - web::WebState::CreateParams params(_browserState);
|
| - for (CRWNavigationManagerStorage* session in sessions) {
|
| - std::unique_ptr<web::WebState> webState =
|
| - web::WebState::Create(params, session);
|
| + while (window.unclaimedSessions) {
|
| // Add all tabs at the 0 position as the position is relative to an old
|
| // tabModel.
|
| + std::unique_ptr<web::WebStateImpl> webState = [window nextSession];
|
| tabRestoreService->CreateHistoricalTab(
|
| sessions::IOSLiveTab::GetForWebState(webState.get()), 0);
|
| }
|
|
|