Bug 1245516 - Don't shadow originHost, so we can process appOrigin correctly r=margaret
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4424,17 +4424,17 @@ Tab.prototype = {
// If we are navigating to a new location with a different host,
// clear any URL origin that might have been pinned to this tab.
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
let appOrigin = ss.getTabValue(this, "appOrigin");
if (appOrigin) {
let originHost = "";
try {
- let originHost = Services.io.newURI(appOrigin, null, null).host;
+ originHost = Services.io.newURI(appOrigin, null, null).host;
} catch (e if (e.result == Cr.NS_ERROR_FAILURE)) {
// NS_ERROR_FAILURE can be thrown by nsIURI.host if the URI scheme does not possess a host - in this case
// we just act as if we have an empty host.
}
if (originHost != aLocationURI.host) {
// Note: going 'back' will not make this tab pinned again
ss.deleteTabValue(this, "appOrigin");
}