mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Backed out changeset a311d7c6ce20 (bug 1363975)
This commit is contained in:
parent
3965b9c29e
commit
05cf62c272
@ -13,9 +13,6 @@ var SocialUI,
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Utils",
|
||||
"resource://gre/modules/sessionstore/Utils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "OpenGraphBuilder", function() {
|
||||
let tmp = {};
|
||||
Cu.import("resource:///modules/Social.jsm", tmp);
|
||||
@ -206,11 +203,7 @@ SocialActivationListener = {
|
||||
if (provider.postActivationURL) {
|
||||
// if activated from an open share panel, we load the landing page in
|
||||
// a background tab
|
||||
let triggeringPrincipal = Utils.deserializePrincipal(aMessage.data.triggeringPrincipal);
|
||||
gBrowser.loadOneTab(provider.postActivationURL, {
|
||||
inBackground: SocialShare.panel.state == "open",
|
||||
triggeringPrincipal,
|
||||
});
|
||||
gBrowser.loadOneTab(provider.postActivationURL, {inBackground: SocialShare.panel.state == "open"});
|
||||
}
|
||||
});
|
||||
}, options);
|
||||
|
@ -2291,14 +2291,11 @@ function delayedOpenWindow(chrome, flags, href, postData) {
|
||||
the URI kicked off before becoming the active content area. */
|
||||
function delayedOpenTab(aUrl, aReferrer, aCharset, aPostData, aAllowThirdPartyFixup) {
|
||||
gBrowser.loadOneTab(aUrl, {
|
||||
referrerURI: aReferrer,
|
||||
charset: aCharset,
|
||||
postData: aPostData,
|
||||
inBackground: false,
|
||||
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
||||
// Bug 1367168: only use systemPrincipal till we can remove that function
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
});
|
||||
referrerURI: aReferrer,
|
||||
charset: aCharset,
|
||||
postData: aPostData,
|
||||
inBackground: false,
|
||||
allowThirdPartyFixup: aAllowThirdPartyFixup});
|
||||
}
|
||||
|
||||
var gLastOpenDirectory = {
|
||||
@ -2606,8 +2603,7 @@ function BrowserViewSourceOfDocument(aArgsOrDocument) {
|
||||
relatedToCurrent: true,
|
||||
inBackground: false,
|
||||
preferredRemoteType,
|
||||
sameProcessAsFrameLoader: args.browser ? args.browser.frameLoader : null,
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
sameProcessAsFrameLoader: args.browser ? args.browser.frameLoader : null
|
||||
});
|
||||
args.viewSourceBrowser = tabBrowser.getBrowserForTab(tab);
|
||||
top.gViewSourceUtils.viewSourceInBrowser(args);
|
||||
@ -3416,8 +3412,7 @@ var PrintPreviewListener = {
|
||||
return gBrowser.loadOneTab("about:printpreview", {
|
||||
inBackground: true,
|
||||
preferredRemoteType,
|
||||
sameProcessAsFrameLoader: browser.frameLoader,
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
sameProcessAsFrameLoader: browser.frameLoader
|
||||
});
|
||||
},
|
||||
getPrintPreviewBrowser() {
|
||||
@ -3442,8 +3437,7 @@ var PrintPreviewListener = {
|
||||
let browser = this.getSourceBrowser();
|
||||
this._simplifyPageTab = gBrowser.loadOneTab("about:printpreview", {
|
||||
inBackground: true,
|
||||
sameProcessAsFrameLoader: browser.frameLoader,
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
sameProcessAsFrameLoader: browser.frameLoader
|
||||
});
|
||||
return this.getSimplifiedSourceBrowser();
|
||||
},
|
||||
|
@ -41,8 +41,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "PageMetadata",
|
||||
"resource://gre/modules/PageMetadata.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUIUtils",
|
||||
"resource:///modules/PlacesUIUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Utils",
|
||||
"resource://gre/modules/sessionstore/Utils.jsm");
|
||||
XPCOMUtils.defineLazyGetter(this, "PageMenuChild", function() {
|
||||
let tmp = {};
|
||||
Cu.import("resource://gre/modules/PageMenu.jsm", tmp);
|
||||
@ -810,8 +808,7 @@ addEventListener("ActivateSocialFeature", function(aEvent) {
|
||||
sendAsyncMessage("Social:Activation", {
|
||||
url: ownerDocument.location.href,
|
||||
origin: ownerDocument.nodePrincipal.origin,
|
||||
manifest: data,
|
||||
triggeringPrincipal: Utils.serializePrincipal(ownerDocument.nodePrincipal),
|
||||
manifest: data
|
||||
});
|
||||
}, true, true);
|
||||
|
||||
|
@ -1179,8 +1179,7 @@ nsContextMenu.prototype = {
|
||||
}
|
||||
let tab = tabBrowser.loadOneTab("about:blank", {
|
||||
relatedToCurrent: true,
|
||||
inBackground: false,
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
inBackground: false
|
||||
});
|
||||
return tabBrowser.getBrowserForTab(tab);
|
||||
}
|
||||
|
@ -16,8 +16,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
|
||||
"resource:///modules/E10SUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
|
||||
"resource://gre/modules/BrowserUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Utils",
|
||||
"resource://gre/modules/sessionstore/Utils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "AboutReader",
|
||||
@ -659,7 +657,7 @@ let PrerenderContentHandler = {
|
||||
}
|
||||
},
|
||||
|
||||
startPrerenderingDocument(aHref, aReferrer, aTriggeringPrincipal) {
|
||||
startPrerenderingDocument(aHref, aReferrer) {
|
||||
// XXX: Make this constant a pref
|
||||
if (this._pending.length >= 2) {
|
||||
return;
|
||||
@ -670,7 +668,6 @@ let PrerenderContentHandler = {
|
||||
href: aHref.spec,
|
||||
referrer: aReferrer ? aReferrer.spec : null,
|
||||
id,
|
||||
triggeringPrincipal: Utils.serializePrincipal(aTriggeringPrincipal),
|
||||
});
|
||||
|
||||
this._pending.push({
|
||||
@ -732,9 +729,9 @@ var WebBrowserChrome = {
|
||||
return true;
|
||||
},
|
||||
|
||||
startPrerenderingDocument(aHref, aReferrer, aTriggeringPrincipal) {
|
||||
startPrerenderingDocument(aHref, aReferrer) {
|
||||
if (PrerenderContentHandler.initialized) {
|
||||
PrerenderContentHandler.startPrerenderingDocument(aHref, aReferrer, aTriggeringPrincipal);
|
||||
PrerenderContentHandler.startPrerenderingDocument(aHref, aReferrer);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -5211,7 +5211,6 @@
|
||||
allowThirdPartyFixup: true,
|
||||
relatedToCurrent: true,
|
||||
isPrerendered: true,
|
||||
triggeringPrincipal: Utils.deserializePrincipal(data.triggeringPrincipal),
|
||||
});
|
||||
let partialSHistory = newTab.linkedBrowser.frameLoader.partialSHistory;
|
||||
groupedSHistory.addPrerenderingPartialSHistory(partialSHistory, data.id);
|
||||
|
@ -218,12 +218,10 @@ CustomizeMode.prototype = {
|
||||
}
|
||||
|
||||
if (!gTab) {
|
||||
this.setTab(this.browser.loadOneTab("about:blank", {
|
||||
inBackground: false,
|
||||
forceNotRemote: true,
|
||||
skipAnimation: true,
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
}));
|
||||
this.setTab(this.browser.loadOneTab("about:blank",
|
||||
{ inBackground: false,
|
||||
forceNotRemote: true,
|
||||
skipAnimation: true }));
|
||||
return;
|
||||
}
|
||||
if (!gTab.selected) {
|
||||
|
@ -121,7 +121,7 @@ let WebCompatReporter = {
|
||||
|
||||
let tab = gBrowser.loadOneTab(
|
||||
`${WebCompatReporter.endpoint}?url=${encodeURIComponent(tabData.url)}&src=desktop-reporter`,
|
||||
{inBackground: false, triggeringPrincipal: Services.securityManager.getSystemPrincipal()});
|
||||
{inBackground: false});
|
||||
|
||||
// If we successfully got a screenshot blob, add a listener to know when
|
||||
// the new tab is loaded before sending it over.
|
||||
|
@ -3145,7 +3145,7 @@ nsIDocument::PrerenderHref(nsIURI* aHref)
|
||||
tabChild->GetWebBrowserChrome(getter_AddRefs(wbc3));
|
||||
NS_ENSURE_TRUE(wbc3, false);
|
||||
|
||||
rv = wbc3->StartPrerenderingDocument(aHref, referrer, NodePrincipal());
|
||||
rv = wbc3->StartPrerenderingDocument(aHref, referrer);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
|
||||
return true;
|
||||
|
@ -79,11 +79,8 @@ interface nsIWebBrowserChrome3 : nsIWebBrowserChrome2
|
||||
*
|
||||
* @param aHref The URI to begin prerendering
|
||||
* @param aReferrer The URI of the document requesting the prerender.
|
||||
* @param aTriggeringPrincipal The Principal that initiated to load aHref
|
||||
*/
|
||||
void startPrerenderingDocument(in nsIURI aHref,
|
||||
in nsIURI aReferrer,
|
||||
in nsIPrincipal aTriggeringPrincipal);
|
||||
void startPrerenderingDocument(in nsIURI aHref, in nsIURI aReferrer);
|
||||
|
||||
/**
|
||||
* Check if there's a prerendered document which matches given URI /
|
||||
|
@ -482,10 +482,8 @@ var TelemetryReportingPolicyImpl = {
|
||||
win.addEventListener("unload", removeListeners);
|
||||
win.gBrowser.addTabsProgressListener(progressListener);
|
||||
|
||||
tab = win.gBrowser.loadOneTab(firstRunPolicyURL, {
|
||||
inBackground: true,
|
||||
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||
});
|
||||
tab = win.gBrowser.loadOneTab(firstRunPolicyURL, { inBackground: true });
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
|
@ -429,8 +429,7 @@ NS_IMETHODIMP nsContentTreeOwner::ReloadInFreshProcess(nsIDocShell* aDocShell,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsContentTreeOwner::StartPrerenderingDocument(nsIURI* aHref,
|
||||
nsIURI* aReferrer,
|
||||
nsIPrincipal* aTriggeringPrincipal)
|
||||
nsIURI* aReferrer)
|
||||
{
|
||||
NS_WARNING("Cannot prerender a document in the parent process");
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user