• Danyao Wang's avatar
    [Nav Experiment] Early exit if CommitPendingItem is already called. · 2d614435
    Danyao Wang authored
    CommitPendingItem may be called more than once. For example, when a
    navigation fails after it is committed, |webView:didFailNavigation|
    calls |loadNativeViewWithSuccess|, which calls CommitPendingItem a
    second time even though it was already called once in
    |webView:didCommitNavigation|.
    
    NavigationAndLoadCallbacksTest.FailedLoad is failing because of this
    reason. This CL fixes the test and the occasional crash observed in
    WKBasedNavigationManagerImpl::CommitPendingItem.
    
    Bug: 795475
    Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
    Change-Id: I62bbd7b87e26c4e82f197d533a8d5951cf2531e0
    Reviewed-on: https://chromium-review.googlesource.com/1002893Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Commit-Queue: Danyao Wang <danyao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#549290}
    2d614435
wk_based_navigation_manager_impl.mm 20.3 KB