Comment 3 for bug 1398941

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

It turns out that disabling the built-in error page has unintended consequences.

When the initial load fails, the pending navigation entry is removed. When the error page load starts, a new pending entry is created and this gets committed with the URL that caused the error. This means that if we remove the error page then WebView.url reverts to the previously committed URL when a load fails, which is not the expected behaviour (it also explains why the committed event has a different URL).

I'm going to fix this by removing the extra started and succeeded events, and adding LoadEvent.isErrorPage. This means that the new sequence will be:

type=started, url="http://invalid/", isErrorPage=false
type=failed, url="http://invalid/", isErrorPage=false
type=committed, url="http://invalid/", isErrorPage=true

... with the committed event indicating that the webview has been navigated and the old document no longer exists. There are already other cases where we get a committed event without any corresponding started or succeeded events - eg, in-document navigations (where only the URL fragment changes) will do this.