Bug 1257316 update history purge for e10s compat, r=markh

This commit is contained in:
Shane Caraveo 2016-03-17 09:11:59 -07:00
Родитель 87e0b36d2d
Коммит 6c2b4cfc29
1 изменённых файлов: 4 добавлений и 10 удалений

Просмотреть файл

@ -361,6 +361,7 @@ SocialFlyout = {
iframe.setAttribute("flex", "1"); iframe.setAttribute("flex", "1");
iframe.setAttribute("message", "true"); iframe.setAttribute("message", "true");
iframe.setAttribute("messagemanagergroup", "social"); iframe.setAttribute("messagemanagergroup", "social");
iframe.setAttribute("disablehistory", "true");
iframe.setAttribute("tooltip", "aHTMLTooltip"); iframe.setAttribute("tooltip", "aHTMLTooltip");
iframe.setAttribute("context", "contentAreaContextMenu"); iframe.setAttribute("context", "contentAreaContextMenu");
iframe.setAttribute("origin", SocialSidebar.provider.origin); iframe.setAttribute("origin", SocialSidebar.provider.origin);
@ -504,6 +505,7 @@ SocialShare = {
iframe.setAttribute("class", "social-share-frame"); iframe.setAttribute("class", "social-share-frame");
iframe.setAttribute("context", "contentAreaContextMenu"); iframe.setAttribute("context", "contentAreaContextMenu");
iframe.setAttribute("tooltip", "aHTMLTooltip"); iframe.setAttribute("tooltip", "aHTMLTooltip");
iframe.setAttribute("disablehistory", "true");
iframe.setAttribute("disableglobalhistory", "true"); iframe.setAttribute("disableglobalhistory", "true");
iframe.setAttribute("flex", "1"); iframe.setAttribute("flex", "1");
iframe.setAttribute("message", "true"); iframe.setAttribute("message", "true");
@ -595,11 +597,7 @@ SocialShare = {
this.iframe.docShell.createAboutBlankContentViewer(null); this.iframe.docShell.createAboutBlankContentViewer(null);
this.currentShare = null; this.currentShare = null;
// share panel use is over, purge any history // share panel use is over, purge any history
if (this.iframe.sessionHistory) { this.iframe.purgeSessionHistory();
let purge = this.iframe.sessionHistory.count;
if (purge > 0)
this.iframe.sessionHistory.PurgeHistory(purge);
}
}, },
sharePage: function(providerOrigin, graphData, target, anchor) { sharePage: function(providerOrigin, graphData, target, anchor) {
@ -708,11 +706,7 @@ SocialShare = {
} }
// if the user switched between share providers we do not want that history // if the user switched between share providers we do not want that history
// available. // available.
if (iframe.sessionHistory) { iframe.purgeSessionHistory();
let purge = iframe.sessionHistory.count;
if (purge > 0)
iframe.sessionHistory.PurgeHistory(purge);
}
// always ensure that origin belongs to the endpoint // always ensure that origin belongs to the endpoint
let uri = Services.io.newURI(shareEndpoint, null, null); let uri = Services.io.newURI(shareEndpoint, null, null);