Reland: Do not call 'navigation committed' callback if there was no pending item to commit.

GetPendingItem can return null inside webView:didCommitNavigation:
This is due to, which allows to discard pending items
by another navigations prematurely.

If pending item is null, it means that Navigation Manager will not commit
that item and WebStateObservers can crash because they expect to have at
least one committed item.

This CL leaves navigation as "uncommitted" if there was no pending item
inside webView:didCommitNavigation:

Original CL:

(cherry picked from commit 621ddc377ebc96f7ecd524a39956b911fd70d6f1)

Bug: 925304
Change-Id: I7852da807d183e87d1fd029d75ed63cde2287d7b
Commit-Queue: Eugene But <>
Reviewed-by: Justin Cohen <>
Cr-Original-Commit-Position: refs/heads/master@{#628537}
Reviewed-by: Eugene But <>
Cr-Commit-Position: refs/branch-heads/3683@{#148}
Cr-Branched-From: e51029943e0a38dd794b73caaf6373d5496ae783-refs/heads/master@{#625896}
1 file changed