Index: content/browser/frame_host/navigation_handle_impl.cc |
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc |
index 16ae7a2fe3245fb3bc7cebced866bf43d42b180b..6e58e2ce96f54d897712fa0ae2e61492c72e61e5 100644 |
--- a/content/browser/frame_host/navigation_handle_impl.cc |
+++ b/content/browser/frame_host/navigation_handle_impl.cc |
@@ -202,9 +202,7 @@ bool NavigationHandleImpl::HasUserGesture() { |
} |
ui::PageTransition NavigationHandleImpl::GetPageTransition() { |
- CHECK_NE(INITIAL, state_) |
- << "This accessor should not be called before the request is started."; |
- return transition_; |
+ return state_ == INITIAL ? ui::PAGE_TRANSITION_TYPED : transition_; |
} |
bool NavigationHandleImpl::IsExternalProtocol() { |
@@ -218,13 +216,7 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { |
} |
RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { |
- // TODO(mkwst): Change this to check against 'READY_TO_COMMIT' once |
- // ReadyToCommitNavigation is available whether or not PlzNavigate is |
- // enabled. https://crbug.com/621856 |
- CHECK_GE(state_, WILL_PROCESS_RESPONSE) |
- << "This accessor should only be called after a response has been " |
- "delivered for processing."; |
- return render_frame_host_; |
+ return state_ >= READY_TO_COMMIT ? render_frame_host_ : nullptr; |
} |
bool NavigationHandleImpl::IsSamePage() { |