Description[ios] Made IDC_BACK and IDC_FORWARD safe.
NavigationManager's GoBack() and GoForward() crash if navigation is not
possible. This mirrors NavigationController's behavior so
NavigationManager should only be changed along with
NavigationController.
KeyCommandsProvider sends IDC_FORWARD and IDC_BACK commands without
checking that navigation is possible and app crashes.
There are 2 fully correct options to fix this bug:
1.) Change NavigationManager and NavigationController, so they don't
crash (which has both pros and cons).
2.) Change KeyCommandsProvider, so it does not send IDC_FORWARD,
IDC_BACK commands if navigation is not possible.
Correct fix will be tracked in a separate bug (crbug.com/677160), and
this CL simply fixes a crash in the most simplest way w/o touching
Tab class (which will be removed).
BUG=676727
Committed: https://crrev.com/4ace5d8e5ece05349d1545692c2a2639f2d74d72
Cr-Commit-Position: refs/heads/master@{#440773}
Patch Set 1 #Patch Set 2 : Added TODO #Messages
Total messages: 15 (9 generated)
|