Index: ios/web/navigation/crw_session_controller.mm |
diff --git a/ios/web/navigation/crw_session_controller.mm b/ios/web/navigation/crw_session_controller.mm |
index d03bf9481386425669ff7c8f9bbaf4f29a8a8796..2a50b724681b90b18abeca45267fc58bf690d200 100644 |
--- a/ios/web/navigation/crw_session_controller.mm |
+++ b/ios/web/navigation/crw_session_controller.mm |
@@ -496,10 +496,10 @@ - (void)pushNewItemWithURL:(const GURL&)URL |
transition:(ui::PageTransition)transition { |
DCHECK(![self pendingEntry]); |
DCHECK([self currentEntry]); |
- web::NavigationItem* currentItem = [self currentEntry].navigationItem; |
+ web::NavigationItem* visibleItem = [self visibleEntry].navigationItem; |
CHECK(web::history_state_util::IsHistoryStateChangeValid( |
- currentItem->GetURL(), URL)); |
liaoyuke
2017/02/22 00:12:32
Confirmed with Kurt and it is safe to change all c
Eugene But (OOO till 7-30)
2017/02/22 21:57:41
Why is this visible? Should this be lastCommittedI
kkhorimoto
2017/02/22 22:54:15
Since a page showing an interstitial can't do a pu
Eugene But (OOO till 7-30)
2017/02/23 00:54:23
Yuke, please address this comment.
Eugene But (OOO till 7-30)
2017/02/23 02:36:59
Yuke?
liaoyuke
2017/02/23 17:50:42
Sorry, missed this one. Done!
|
- web::Referrer referrer(currentItem->GetURL(), web::ReferrerPolicyDefault); |
+ visibleItem->GetURL(), URL)); |
+ web::Referrer referrer(visibleItem->GetURL(), web::ReferrerPolicyDefault); |
base::scoped_nsobject<CRWSessionEntry> pushedEntry([self |
sessionEntryWithURL:URL |
@@ -508,7 +508,7 @@ - (void)pushNewItemWithURL:(const GURL&)URL |
initiationType:web::NavigationInitiationType::USER_INITIATED]); |
web::NavigationItemImpl* pushedItem = [pushedEntry navigationItemImpl]; |
- pushedItem->SetIsOverridingUserAgent(currentItem->IsOverridingUserAgent()); |
+ pushedItem->SetIsOverridingUserAgent(visibleItem->IsOverridingUserAgent()); |
pushedItem->SetSerializedStateObject(stateObject); |
pushedItem->SetIsCreatedFromPushState(true); |
web::SSLStatus& sslStatus = [self currentEntry].navigationItem->GetSSL(); |