From 660bbcb38deffed212900077e688b6d81f69562a Mon Sep 17 00:00:00 2001 From: Shane Tomlinson Date: Fri, 18 Dec 2015 18:11:29 +0000 Subject: [PATCH] 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. --- browser/base/content/aboutaccounts/aboutaccounts.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/browser/base/content/aboutaccounts/aboutaccounts.js b/browser/base/content/aboutaccounts/aboutaccounts.js index 046f86434833..1788f204d0e1 100644 --- a/browser/base/content/aboutaccounts/aboutaccounts.js +++ b/browser/base/content/aboutaccounts/aboutaccounts.js @@ -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 () {