mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 04:58:00 +00:00
Bug 956382 - Ignore document.domain by default. r=mrbkap
This commit is contained in:
parent
5e82273b68
commit
0efcb609ad
@ -31,12 +31,12 @@ interface nsIPrincipal : nsISerializable
|
||||
boolean equals(in nsIPrincipal other);
|
||||
|
||||
/**
|
||||
* Like equals, but doesn't take document.domain changes into account.
|
||||
* An alias for equals() (for now).
|
||||
*/
|
||||
boolean equalsIgnoringDomain(in nsIPrincipal other);
|
||||
|
||||
/**
|
||||
* An alias for equals() (for now).
|
||||
* Like equals, but takes document.domain changes into account.
|
||||
*/
|
||||
boolean equalsConsideringDomain(in nsIPrincipal other);
|
||||
|
||||
@ -101,13 +101,13 @@ interface nsIPrincipal : nsISerializable
|
||||
boolean subsumes(in nsIPrincipal other);
|
||||
|
||||
/**
|
||||
* Same as the previous method, subsumes(), but for codebase principals
|
||||
* ignores changes to document.domain.
|
||||
* An alias for subsumes() (for now);
|
||||
*/
|
||||
boolean subsumesIgnoringDomain(in nsIPrincipal other);
|
||||
|
||||
/**
|
||||
* An alias for subsumes() (for now);
|
||||
* Same as the previous method, subsumes(), but takes document.domain into
|
||||
* account.
|
||||
*/
|
||||
boolean subsumesConsideringDomain(in nsIPrincipal other);
|
||||
|
||||
|
@ -231,7 +231,7 @@ nsPrincipal::GetOrigin(char **aOrigin)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrincipal::Equals(nsIPrincipal *aOther, bool *aResult)
|
||||
nsPrincipal::EqualsConsideringDomain(nsIPrincipal *aOther, bool *aResult)
|
||||
{
|
||||
*aResult = false;
|
||||
|
||||
@ -245,14 +245,13 @@ nsPrincipal::Equals(nsIPrincipal *aOther, bool *aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Codebases are equal if they have the same origin.
|
||||
*aResult = NS_SUCCEEDED(
|
||||
nsScriptSecurityManager::CheckSameOriginPrincipal(this, aOther));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrincipal::EqualsIgnoringDomain(nsIPrincipal *aOther, bool *aResult)
|
||||
nsPrincipal::Equals(nsIPrincipal *aOther, bool *aResult)
|
||||
{
|
||||
*aResult = false;
|
||||
|
||||
@ -286,7 +285,7 @@ nsPrincipal::EqualsIgnoringDomain(nsIPrincipal *aOther, bool *aResult)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrincipal::EqualsConsideringDomain(nsIPrincipal *aOther, bool *aResult)
|
||||
nsPrincipal::EqualsIgnoringDomain(nsIPrincipal *aOther, bool *aResult)
|
||||
{
|
||||
return Equals(aOther, aResult);
|
||||
}
|
||||
@ -306,7 +305,7 @@ nsPrincipal::SubsumesIgnoringDomain(nsIPrincipal *aOther, bool *aResult)
|
||||
NS_IMETHODIMP
|
||||
nsPrincipal::SubsumesConsideringDomain(nsIPrincipal *aOther, bool *aResult)
|
||||
{
|
||||
return Subsumes(aOther, aResult);
|
||||
return EqualsConsideringDomain(aOther, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
x
Reference in New Issue
Block a user