Index: ios/web/navigation/navigation_manager_impl.mm |
diff --git a/ios/web/navigation/navigation_manager_impl.mm b/ios/web/navigation/navigation_manager_impl.mm |
index bb034a6aad5da39ca51c6f30064e4995608802ea..e48b89ae1c516a05ec7090a84be5dc029bb88eee 100644 |
--- a/ios/web/navigation/navigation_manager_impl.mm |
+++ b/ios/web/navigation/navigation_manager_impl.mm |
@@ -148,12 +148,8 @@ void NavigationManagerImpl::LoadURL(const GURL& url, |
void NavigationManagerImpl::AddTransientItem(const GURL& url) { |
[session_controller_ addTransientItemWithURL:url]; |
- // TODO(crbug.com/676129): Transient item is only supposed to be added for |
- // pending non-app-specific loads, but pending item can be null because of the |
- // bug. The workaround should be removed once the bug is fixed. |
NavigationItem* item = GetPendingItem(); |
- if (!item) |
- item = GetLastCommittedNonAppSpecificItem(); |
+ DCHECK(item); |
Eugene But (OOO till 7-30)
2017/06/15 00:08:11
nit: No need for DCHECK before dereferencing the p
mrefaat
2017/06/15 18:35:35
Done.
|
DCHECK(item->GetUserAgentType() != UserAgentType::NONE); |
GetTransientItem()->SetUserAgentType(item->GetUserAgentType()); |
} |