Bug 952473 - SessionStore should only watch for top-level pageshow events. r=wesj, a=bajaj
authorMark Finkle <mfinkle@mozilla.com>
Fri, 20 Dec 2013 16:41:11 -0500
changeset 167821 a4ceb800b3dc191b34ae09f17d3fd6bb3a3aefbc
parent 167820 fd45cf4498d2231f123cb499c91483047f0b85a2
child 167822 215140a367e0c75c73fafbe77e4a4d5b3a67b072
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj, bajaj
bugs952473
milestone27.0
Bug 952473 - SessionStore should only watch for top-level pageshow events. r=wesj, a=bajaj
mobile/android/components/SessionStore.js
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -219,17 +219,19 @@ SessionStore.prototype = {
       }
       case "TabSelect": {
         let browser = aEvent.target;
         this.onTabSelect(window, browser);
         break;
       }
       case "pageshow": {
         let browser = aEvent.currentTarget;
-        this.onTabLoad(window, browser, aEvent.persisted);
+        // Top-level changes only
+        if (aEvent.originalTarget == browser.contentDocument)
+          this.onTabLoad(window, browser, aEvent.persisted);
         break;
       }
     }
   },
 
   onWindowOpen: function ss_onWindowOpen(aWindow) {
     // Return if window has already been initialized
     if (aWindow && aWindow.__SSID && this._windows[aWindow.__SSID])