Bug 950132 - Ignore empty pageStyle data r=yoric a=lsblakk
☠☠ backed out by dbe88da38289 ☠ ☠
authorTim Taubert <ttaubert@mozilla.com>
Thu, 09 Jan 2014 12:11:33 +0100
changeset 175771 68f02b6be062ebfd7fe8e25d18cfc6b474c2af7e
parent 175770 964de5dfb9ce7149a85c451a167889284d60bbf0
child 175772 3d50d3496a640d281fe06db8c78601e23848b105
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyoric, lsblakk
bugs950132
milestone28.0a2
Bug 950132 - Ignore empty pageStyle data r=yoric a=lsblakk
browser/components/sessionstore/src/SessionStore.jsm
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -2924,17 +2924,19 @@ let SessionStoreInternal = {
   restoreDocument: function ssi_restoreDocument(aWindow, aBrowser, aEvent) {
     // wait for the top frame to be loaded completely
     if (!aEvent || !aEvent.originalTarget || !aEvent.originalTarget.defaultView ||
         aEvent.originalTarget.defaultView != aEvent.originalTarget.defaultView.top) {
       return;
     }
 
     let frameList = this.getFramesToRestore(aBrowser);
-    PageStyle.restore(aBrowser.docShell, frameList, aBrowser.__SS_restore_pageStyle);
+    if (aBrowser.__SS_restore_pageStyle) {
+      PageStyle.restore(aBrowser.docShell, frameList, aBrowser.__SS_restore_pageStyle);
+    }
     TextAndScrollData.restore(frameList);
 
     let tab = aBrowser.__SS_restore_tab;
 
     // Drop all the state associated with restoring the tab. We're
     // done with that now.
     delete aBrowser.__SS_data;
     delete aBrowser.__SS_restore_data;