Bug 1245516 - Don't shadow originHost, so we can process appOrigin correctly r=margaret draft
authorAndrzej Hunt <ahunt@mozilla.com>
Wed, 03 Feb 2016 15:27:35 -0800
changeset 328700 a363756073de21197c9f95fe53c3d61629fea4f5
parent 328582 3a53eb9e65544697e80556a69c400f857a70d6e1
child 513850 bf11a6289165a8c7642858c25fda8fbbc387b53b
push id10395
push userahunt@mozilla.com
push dateWed, 03 Feb 2016 23:29:40 +0000
reviewersmargaret
bugs1245516
milestone47.0a1
Bug 1245516 - Don't shadow originHost, so we can process appOrigin correctly r=margaret
mobile/android/chrome/content/browser.js
--- 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");
       }