Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2596243003: [ios] Added a CHECK to didCommitNavigation: to debug crbug.com/676340. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9862aab3701fc9ce38c96ee4e17a1f0fe3c8dc12..9a212d697014ceb269de4b82a58e84fc7c13b089 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -5239,6 +5239,15 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
- (void)webView:(WKWebView*)webView
didCommitNavigation:(WKNavigation*)navigation {
+ // This method will crash if |currentSessionEntry| is null. If this check is
+ // hit it means that |didStartProvisionalNavigation| was called as expected
+ // but it did not call |registerLoadRequest|. TODO(crbug.com/676721): remove
+ // this CHECK once there is at least one crash on this line (which means that
+ // |didStartProvisionalNavigation| did not call |registerLoadRequest| and it
+ // should be fixed.
+ CHECK([self currentSessionEntry] ||
+ ![_latestWKNavigation isEqual:navigation]);
+
DCHECK_EQ(_webView, webView);
_certVerificationErrors->Clear();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698