CSP: Support for "LoadInfo::GetLoadingContext" and "LoadInfo::GetLoadingContextXPCOM()"

https://bugzilla.mozilla.org/show_bug.cgi?id=1439713 (partially)
This commit is contained in:
janekptacijarabaci 2018-06-21 20:56:16 +02:00 committed by Roy Tam
commit 09a81da02d
2 changed files with 38 additions and 2 deletions

View file

@ -10,7 +10,7 @@
interface nsIDOMDocument;
interface nsINode;
interface nsIPrincipal;
native LoadContextRef(already_AddRefed<nsISupports>);
%{C++
#include "nsTArray.h"
#include "mozilla/BasePrincipal.h"
@ -333,6 +333,21 @@ interface nsILoadInfo : nsISupports
[noscript, notxpcom, nostdcall, binaryname(ContextForTopLevelLoad)]
nsISupports binaryContextForTopLevelLoad();
/**
* For all loads except loads of TYPE_DOCUMENT, the loadingContext
* simply returns the loadingNode. For loads of TYPE_DOCUMENT this
* will return the context available for top-level loads which
* do not have a loadingNode.
*/
[binaryname(LoadingContextXPCOM)]
readonly attribute nsISupports loadingContext;
/**
* A C++ friendly version of the loadingContext.
*/
[noscript, notxpcom, nostdcall, binaryname(GetLoadingContext)]
LoadContextRef binaryGetLoadingContext();
/**
* The securityFlags of that channel.
*/