• Danyao Wang's avatar
    [Nav Experiment] Fix crash in [CRWWebController webViewURLDidChange]. · 26771781
    Danyao Wang authored
    This method looks up the current NavigationItem associated with
    WKBackForwardList.currentItem and updates its URL to handle two edge
    cases for location.replace. The lookup crashes if
    WKBackForwardList.currentItem is nil. The correct NavigationItem to
    update in this case is |self.currentNavItem|.
    
    An egtest that triggers this scenario is added; though it's not clear
    if this is the only case.
    
    Bug: 866142
    Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
    Change-Id: I5c76ad50296127234f498741a62b796fb4397461
    Reviewed-on: https://chromium-review.googlesource.com/1228442Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Commit-Queue: Danyao Wang <danyao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#592175}
    26771781
wk_based_navigation_manager_impl.mm 27.2 KB