Bug 1233668 - Ensure Firefox Accounts is loaded with a valid history entry. r=markh

FxA was loaded using webNav.loadURI and LOAD_FLAGS_BYPASS_HISTORY which
caused the initial FxA history entry to be `about:blank`. This caused
two problems: 1) The "back" button did not work on the "Choose what to Sync"
page, and 2) If the user reloaded the page, an exception would occur as soon as
the user filled out the first form.
This commit is contained in:
Shane Tomlinson 2015-12-18 18:11:29 +00:00
Родитель 546a796711
Коммит 660bbcb38d
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -127,10 +127,11 @@ var wrapper = {
url += (url.includes("?") ? "&" : "?") + urlParamStr;
}
this.url = url;
// Set the iframe's location with loadURI/LOAD_FLAGS_BYPASS_HISTORY to
// avoid having a new history entry being added.
// Set the iframe's location with loadURI/LOAD_FLAGS_REPLACE_HISTORY to
// avoid having a new history entry being added. REPLACE_HISTORY is used
// to replace the current entry, which is `about:blank`.
let webNav = iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
webNav.loadURI(url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
webNav.loadURI(url, Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY, null, null, null);
},
retry: function () {