New issue
Advanced search Search tips

Issue 899383 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug

Blocking:
issue 864769



Sign in to add a comment

Lost NavigationItem for placeholder navigation

Project Member Reported by danyao@chromium.org, Oct 26

Issue description

We would like to establish an invariant in |webView:didFinishNavigation| that there is a non-null NavigationContext and NavigationItem associated with the WKNavigation object.

This bug tracks one way this invariant is currently broken in slim-navigation-manager (go/bling-navigation-experiment).

WebUI and native content are loaded in two steps: a placeholder URL is first loaded in WKWebView, and the WebUI or native content is loaded in the |webView:didFinishNavigation| delegate of the placeholder navigation. The NavigationItem is pending and only committed to NavigationManager in the second step.

If a new navigation starts between the |webView:didCommitNavigation| and |webView:didFinishNavigation| delegate callbacks of the placeholder URL load, the old NavigationItem, which is still pending, is clobbered by the new NavigationItem. This makes the unique navigation item index stored in NavigationContext a dangling pointer, and breaks the invariant above.

A possible fix is to store pending NavigationItem in the NavigationContext. However, this is a big departure from the current NavigationManager architecture.
 
Blocking: 864769

Sign in to add a comment