mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 829872 - Add convenience version of Equals/Subsumes to nsIPrincipal. r=bz
This commit is contained in:
parent
64cf6530d4
commit
7b10aa2e1c
@ -36,6 +36,18 @@ interface nsIPrincipal : nsISerializable
|
||||
*/
|
||||
boolean equalsIgnoringDomain(in nsIPrincipal other);
|
||||
|
||||
%{C++
|
||||
inline bool Equals(nsIPrincipal* aOther) {
|
||||
bool equal = false;
|
||||
return NS_SUCCEEDED(Equals(aOther, &equal)) && equal;
|
||||
}
|
||||
|
||||
inline bool EqualsIgnoringDomain(nsIPrincipal* aOther) {
|
||||
bool equal = false;
|
||||
return NS_SUCCEEDED(EqualsIgnoringDomain(aOther, &equal)) && equal;
|
||||
}
|
||||
%}
|
||||
|
||||
/**
|
||||
* Returns a hash value for the principal.
|
||||
*/
|
||||
@ -100,6 +112,18 @@ interface nsIPrincipal : nsISerializable
|
||||
*/
|
||||
boolean subsumesIgnoringDomain(in nsIPrincipal other);
|
||||
|
||||
%{C++
|
||||
inline bool Subsumes(nsIPrincipal* aOther) {
|
||||
bool subsumes = false;
|
||||
return NS_SUCCEEDED(Subsumes(aOther, &subsumes)) && subsumes;
|
||||
}
|
||||
|
||||
inline bool SubsumesIgnoringDomain(nsIPrincipal* aOther) {
|
||||
bool subsumes = false;
|
||||
return NS_SUCCEEDED(SubsumesIgnoringDomain(aOther, &subsumes)) && subsumes;
|
||||
}
|
||||
%}
|
||||
|
||||
/**
|
||||
* Checks whether this principal is allowed to load the network resource
|
||||
* located at the given URI under the same-origin policy. This means that
|
||||
|
Loading…
Reference in New Issue
Block a user