diff --git a/netwerk/protocol/http/ClassifierDummyChannel.cpp b/netwerk/protocol/http/ClassifierDummyChannel.cpp index 873bf9728995..1b8799484a35 100644 --- a/netwerk/protocol/http/ClassifierDummyChannel.cpp +++ b/netwerk/protocol/http/ClassifierDummyChannel.cpp @@ -735,5 +735,10 @@ NS_IMETHODIMP ClassifierDummyChannel::IsThirdPartySocialTrackingResource( void ClassifierDummyChannel::DoDiagnosticAssertWhenOnStopNotCalledOnDestroy() {} +NS_IMETHODIMP ClassifierDummyChannel::GetResponseEmbedderPolicy( + nsILoadInfo::CrossOriginEmbedderPolicy* aOutPolicy) { + return NS_ERROR_NOT_IMPLEMENTED; +} + } // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index edf5c017d362..600304476edb 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -4411,8 +4411,8 @@ void HttpBaseChannel::SetIPv4Disabled() { mCaps |= NS_HTTP_DISABLE_IPV4; } void HttpBaseChannel::SetIPv6Disabled() { mCaps |= NS_HTTP_DISABLE_IPV6; } -nsresult HttpBaseChannel::GetResponseEmbedderPolicy( - nsILoadInfo::CrossOriginEmbedderPolicy* aResponseEmbedderPolicy) { +NS_IMETHODIMP HttpBaseChannel::GetResponseEmbedderPolicy( + nsILoadInfo::CrossOriginEmbedderPolicy* aOutPolicy) { if (!mResponseHead) { return NS_ERROR_NOT_AVAILABLE; } @@ -4428,7 +4428,7 @@ nsresult HttpBaseChannel::GetResponseEmbedderPolicy( policy = nsILoadInfo::EMBEDDER_POLICY_REQUIRE_CORP; } - *aResponseEmbedderPolicy = policy; + *aOutPolicy = policy; return NS_OK; } diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/HttpBaseChannel.h index 02772a7754de..99739ffdc84c 100644 --- a/netwerk/protocol/http/HttpBaseChannel.h +++ b/netwerk/protocol/http/HttpBaseChannel.h @@ -318,6 +318,8 @@ class HttpBaseChannel : public nsHashPropertyBag, NS_IMETHOD ComputeCrossOriginOpenerPolicy( nsILoadInfo::CrossOriginOpenerPolicy aInitiatorPolicy, nsILoadInfo::CrossOriginOpenerPolicy* aOutPolicy) override; + NS_IMETHOD GetResponseEmbedderPolicy( + nsILoadInfo::CrossOriginEmbedderPolicy* aOutPolicy) override; virtual bool GetHasNonEmptySandboxingFlag() override { return mHasNonEmptySandboxingFlag; } @@ -592,9 +594,6 @@ class HttpBaseChannel : public nsHashPropertyBag, bool MaybeWaitForUploadStreamLength(nsIStreamListener* aListener, nsISupports* aContext); - nsresult GetResponseEmbedderPolicy( - nsILoadInfo::CrossOriginEmbedderPolicy* aResponseEmbedderPolicy); - void MaybeFlushConsoleReports(); bool IsBrowsingContextDiscarded() const; diff --git a/netwerk/protocol/http/nsIHttpChannelInternal.idl b/netwerk/protocol/http/nsIHttpChannelInternal.idl index a6ea89ab9d8f..334e1f89e1ca 100644 --- a/netwerk/protocol/http/nsIHttpChannelInternal.idl +++ b/netwerk/protocol/http/nsIHttpChannelInternal.idl @@ -401,6 +401,9 @@ interface nsIHttpChannelInternal : nsISupports nsILoadInfo_CrossOriginOpenerPolicy computeCrossOriginOpenerPolicy( in nsILoadInfo_CrossOriginOpenerPolicy aInitiatorPolicy); + [noscript] + nsILoadInfo_CrossOriginEmbedderPolicy getResponseEmbedderPolicy(); + [notxpcom, nostdcall] attribute boolean hasNonEmptySandboxingFlag; [noscript, notxpcom, nostdcall]