Bug 1246956 - Add loadReplace to session history. r=yoric r=mfinkle ba=ritu
authorDragana Damjanovic dd.mozilla@gmail.com
Wed, 02 Mar 2016 15:51:49 -0800
changeset 260975 dd4b90de8fd31fddc2562530e9dbe01325a305da
parent 260974 15873a924eac11350a4bf33d79c46aa9572d9dd9
child 260976 df519be857c841dccf03da544f6218472fa65890
child 260978 afdd361e27480d7a781278b520efb98fb116b2c3
push id294
push userkwierso@gmail.com
push dateWed, 02 Mar 2016 23:55:05 +0000
treeherdermozilla-esr38@dd4b90de8fd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyoric, mfinkle
bugs1246956
milestone38.6.0
Bug 1246956 - Add loadReplace to session history. r=yoric r=mfinkle ba=ritu MozReview-Commit-ID: svsGwqR5Fp
browser/components/sessionstore/SessionHistory.jsm
mobile/android/components/SessionStore.js
--- a/browser/components/sessionstore/SessionHistory.jsm
+++ b/browser/components/sessionstore/SessionHistory.jsm
@@ -192,16 +192,20 @@ let SessionHistoryInternal = {
       entry.referrerPolicy = shEntry.referrerPolicy;
     }
 
     var shEntryESR38 = shEntry.QueryInterface(Ci.nsISHEntry_ESR38);
     if (shEntryESR38) {
       if (shEntryESR38.originalURI) {
         entry.originalURI = shEntryESR38.originalURI.spec;
       }
+
+      if (shEntryESR38.loadReplace) {
+        entry.loadReplace = shEntryESR38.loadReplace;
+      }
     }
 
     if (shEntry.srcdocData)
       entry.srcdocData = shEntry.srcdocData;
 
     if (shEntry.isSrcdocEntry)
       entry.isSrcdocEntry = shEntry.isSrcdocEntry;
 
@@ -351,16 +355,19 @@ let SessionHistoryInternal = {
       shEntry.contentType = entry.contentType;
     if (entry.referrer) {
       shEntry.referrerURI = Utils.makeURI(entry.referrer);
       shEntry.referrerPolicy = entry.referrerPolicy;
     }
     if (entry.originalURI) {
       shEntry.originalURI = Utils.makeURI(entry.originalURI);
     }
+    if (entry.loadReplace) {
+      shEntry.loadReplace = entry.loadReplace;
+    }
     if (entry.isSrcdocEntry)
       shEntry.srcdocData = entry.srcdocData;
     if (entry.baseURI)
       shEntry.baseURI = Utils.makeURI(entry.baseURI);
 
     if (entry.cacheKey) {
       var cacheKey = Cc["@mozilla.org/supports-PRUint32;1"].
                      createInstance(Ci.nsISupportsPRUint32);
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -739,16 +739,20 @@ SessionStore.prototype = {
       entry.referrer = aEntry.referrerURI.spec;
     }
 
     var entryESR38 = aEntry.QueryInterface(Ci.nsISHEntry_ESR38);
     if (entryESR38) {
       if (entryESR38.originalURI) {
         entry.originalURI = entryESR38.originalURI.spec;
       }
+
+      if (entryESR38.loadReplace) {
+        entry.loadReplace = entryESR38.loadReplace;
+      }
     }
 
     if (aEntry.contentType) {
       entry.contentType = aEntry.contentType;
     }
 
     let x = {}, y = {};
     aEntry.getScrollPosition(x, y);
@@ -825,16 +829,20 @@ SessionStore.prototype = {
     if (aEntry.referrer) {
       shEntry.referrerURI = Services.io.newURI(aEntry.referrer, null, null);
     }
 
     if (aEntry.originalURI) {
       shEntry.originalURI =  Services.io.newURI(aEntry.originalURI, null, null);
     }
 
+    if (aEntry.loadReplace) {
+      shEntry.loadReplace = aEntry.loadReplace;
+    }
+
     if (aEntry.cacheKey) {
       let cacheKey = Cc["@mozilla.org/supports-PRUint32;1"].createInstance(Ci.nsISupportsPRUint32);
       cacheKey.data = aEntry.cacheKey;
       shEntry.cacheKey = cacheKey;
     }
 
     if (aEntry.ID) {
       // get a new unique ID for this frame (since the one from the last