Index: ios/web/web_state/ui/crw_web_controller.mm |
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm |
index 7aabe25b46fa8d25f587af1601e3c41b2fee629c..5c731f047000244c0806a0563ef87a0898d75c45 100644 |
--- a/ios/web/web_state/ui/crw_web_controller.mm |
+++ b/ios/web/web_state/ui/crw_web_controller.mm |
@@ -5175,6 +5175,19 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5; |
[self registerLoadRequest:webViewURL]; |
} |
} |
+ |
+ if (![self currentSessionEntry]) { |
+ // In this state CRWWebController will crash in |didCommitNavigation:| |
+ // (crbug.com/676458). It's unclear if web controller could get into this |
+ // state but it's one of the guesses for crbug.com/676458 root cause. Report |
+ // UMA historgam if that happens. |
+ // TODO(crbug.com/677552): Remove this historgam. |
+ UMA_HISTOGRAM_BOOLEAN( |
+ "WebController." |
+ "StartProvisionalNavigationExitedWithEmptyNavigationManager", |
+ true); |
+ } |
+ |
// Ensure the URL is registered and loadPhase is as expected. |
DCHECK(_lastRegisteredRequestURL == webViewURL); |
DCHECK(self.loadPhase == web::LOAD_REQUESTED); |