Bug 952473 - SessionStore should only watch for top-level pageshow events r=wesj
authorMark Finkle <mfinkle@mozilla.com>
Fri, 20 Dec 2013 16:41:11 -0500
changeset 171788 659ceeeb6ff938056a9bcdf649cecdd7ac50b144
parent 171787 a344ab14ff33f0eda6077ce874d8eb303e2b1325
child 171789 edc671806cd04acf57da415d0df9bbf638ee569b
push id5166
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:47:54 +0000
treeherdermozilla-aurora@977eb2548b2d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs952473
milestone29.0a1
Bug 952473 - SessionStore should only watch for top-level pageshow events r=wesj
mobile/android/components/SessionStore.js
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -218,17 +218,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])