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

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

Issue 2690033002: Set fromEntry to nil after discardNonCommittedItems. (Closed)
Patch Set: Created 3 years, 10 months 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 19a95a60e53e49fa95a2123711e9f9f759feb4a8..91c187aab7e7b430def193032a00666735113b48 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -2165,6 +2165,10 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
[self updateHTML5HistoryState];
} else {
[sessionController discardNonCommittedItems];
sdefresne 2017/02/13 10:47:36 I think we should instead retain the fromEntry, by
Olivier 2017/02/13 12:21:05 Thanks I cannot retain the fromEntry as CRWSessio
Olivier 2017/02/13 13:21:24 Done. PTAL.
+ // TODO(crbug.com/691492): After discardNonCommittedItems, fromEntry may
+ // not be valid anymore. Refetch it from the sessionController.
+ // Remove when the fix is not needed anymore.
+ fromEntry = sessionController.currentEntry;
[sessionController setPendingItemIndex:index];
// TODO(crbug.com/684098): move this call out this block to avoid code
« 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