mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Bug 1329032 - Extend loadURIWithOptions by a triggeringPrincipal (without an hard e10s)
This commit is contained in:
parent
102550a483
commit
dee826b7ee
10 changed files with 56 additions and 22 deletions
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
interface nsIDocShell;
|
||||
interface nsIInputStream;
|
||||
interface nsIPrincipal;
|
||||
|
||||
/**
|
||||
* nsIWebBrowserChrome3 is an extension to nsIWebBrowserChrome2.
|
||||
|
|
@ -43,10 +44,13 @@ interface nsIWebBrowserChrome3 : nsIWebBrowserChrome2
|
|||
* The URI being loaded.
|
||||
* @param aReferrer
|
||||
* The referrer of the load.
|
||||
* @param aTriggeringPrincipal
|
||||
* The principal that initiated the load of aURI.
|
||||
*/
|
||||
bool shouldLoadURI(in nsIDocShell aDocShell,
|
||||
in nsIURI aURI,
|
||||
in nsIURI aReferrer);
|
||||
in nsIURI aReferrer,
|
||||
in nsIPrincipal aTriggeringPrincipal);
|
||||
|
||||
/**
|
||||
* Attempts to load the currently loaded page into a fresh process to increase
|
||||
|
|
@ -57,5 +61,6 @@ interface nsIWebBrowserChrome3 : nsIWebBrowserChrome2
|
|||
*/
|
||||
bool reloadInFreshProcess(in nsIDocShell aDocShell,
|
||||
in nsIURI aURI,
|
||||
in nsIURI aReferrer);
|
||||
in nsIURI aReferrer,
|
||||
in nsIPrincipal aTriggeringPrincipal);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -654,13 +654,14 @@ nsWebBrowser::LoadURIWithOptions(const char16_t* aURI, uint32_t aLoadFlags,
|
|||
uint32_t aReferrerPolicy,
|
||||
nsIInputStream* aPostDataStream,
|
||||
nsIInputStream* aExtraHeaderStream,
|
||||
nsIURI* aBaseURI)
|
||||
nsIURI* aBaseURI,
|
||||
nsIPrincipal* aTriggeringPrincipal)
|
||||
{
|
||||
NS_ENSURE_STATE(mDocShell);
|
||||
|
||||
return mDocShellAsNav->LoadURIWithOptions(
|
||||
aURI, aLoadFlags, aReferringURI, aReferrerPolicy, aPostDataStream,
|
||||
aExtraHeaderStream, aBaseURI);
|
||||
aExtraHeaderStream, aBaseURI, aTriggeringPrincipal);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue