WKNavigationDelegate callbacks in CRWWebController all assume that self.currentNavItem is the relevant navigation item associated with the given WKNavigation*. This assumption doesn't seem to hold in some cases and whatever the cause is, it is very likely a bug.
One known example is PassKitEGTest/testPassKitDownload. It triggers DCHECK_EQ(self.currentNavItem->GetUniqueID(), navigationContext->GetNavigationItemUniqueID()), if it is added to |webView:didFailProvisionalNavigation|.
The right way to find the relevant navigation item in a WKNavigationDelegate callback should be web::GetItemWithUniqueID([_navigationStates contextForNavigation:navigation]->GetNavigationItemUniqueID());
Comment 1 by sheriffbot@chromium.org
, Yesterday (46 hours ago)Status: Untriaged (was: Available)