Bug 867957 - Location bar ends up empty when displaying invalid URI error pages. r=dao

This commit is contained in:
Dagger 2013-12-02 11:52:35 -05:00
parent 156f4098b0
commit 3b1d23e4dc

View File

@ -706,9 +706,15 @@
let topLevel = aWebProgress.isTopLevel;
if (topLevel) {
// The document loaded correctly, clear the value if we should
// If userTypedClear > 0, the document loaded correctly and we should be
// clearing the user typed value. We also need to clear the typed value
// if the document failed to load, to make sure the urlbar reflects the
// failed URI (particularly for SSL errors). However, don't clear the value
// if the error page's URI is about:blank, because that causes complete
// loss of urlbar contents for invalid URI errors (see bug 867957).
if (this.mBrowser.userTypedClear > 0 ||
(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE))
((aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) &&
aLocation.spec != "about:blank"))
this.mBrowser.userTypedValue = null;
// Clear out the missing plugins list since it's related to the