Bug 806587: Restore getCodebasePrincipal since extensions use it. r=mounir

This commit is contained in:
Jonas Sicking 2012-10-30 22:24:41 +01:00
Родитель ca1359ab4b
Коммит 00c5245c10
4 изменённых файлов: 28 добавлений и 1 удалений

Просмотреть файл

@ -10,7 +10,7 @@ interface nsIURI;
interface nsIChannel;
interface nsIDocShell;
[scriptable, uuid(b17f9a0b-c36b-4961-8f19-11e03f43436d)]
[scriptable, uuid(ae486501-ec57-4ec8-a565-6880ca4ae6c4)]
interface nsIScriptSecurityManager : nsIXPCSecurityManager
{
///////////////// Security Checks //////////////////
@ -167,6 +167,13 @@ interface nsIScriptSecurityManager : nsIXPCSecurityManager
*/
nsIPrincipal getNoAppCodebasePrincipal(in nsIURI uri);
/**
* Legacy name for getNoAppCodebasePrincipal.
*
* @deprecated use getNoAppCodebasePrincipal instead.
*/
[deprecated] nsIPrincipal getCodebasePrincipal(in nsIURI uri);
///////////////////////
/**
* Return the principal of the specified object in the specified context.

Просмотреть файл

@ -1870,6 +1870,13 @@ nsScriptSecurityManager::GetNoAppCodebasePrincipal(nsIURI* aURI,
false, aPrincipal);
}
NS_IMETHODIMP
nsScriptSecurityManager::GetCodebasePrincipal(nsIURI* aURI,
nsIPrincipal** aPrincipal)
{
return GetNoAppCodebasePrincipal(aURI, aPrincipal);
}
NS_IMETHODIMP
nsScriptSecurityManager::GetAppCodebasePrincipal(nsIURI* aURI,
uint32_t aAppId,

Просмотреть файл

@ -757,6 +757,12 @@ FullTrustSecMan::GetNoAppCodebasePrincipal(nsIURI *aURI,
return GetSimpleCodebasePrincipal(aURI, _retval);
}
NS_IMETHODIMP
FullTrustSecMan::GetCodebasePrincipal(nsIURI *aURI, nsIPrincipal **_retval)
{
return GetSimpleCodebasePrincipal(aURI, _retval);
}
NS_IMETHODIMP
FullTrustSecMan::GetAppCodebasePrincipal(nsIURI *aURI,
uint32_t aAppId,

Просмотреть файл

@ -1395,6 +1395,13 @@ FullTrustSecMan::GetNoAppCodebasePrincipal(nsIURI *aURI, nsIPrincipal **_retval)
return GetSimpleCodebasePrincipal(aURI, _retval);
}
/* [noscript] nsIPrincipal getCodebasePrincipal (in nsIURI aURI); */
NS_IMETHODIMP
FullTrustSecMan::GetCodebasePrincipal(nsIURI *aURI, nsIPrincipal **_retval)
{
return GetSimpleCodebasePrincipal(aURI, _retval);
}
/* [noscript] nsIPrincipal getAppCodebasePrincipal (in nsIURI aURI, unsigned long appid, bool inMozBrowser); */
NS_IMETHODIMP
FullTrustSecMan::GetAppCodebasePrincipal(nsIURI *aURI, uint32_t aAppId, bool aInMozBrowser, nsIPrincipal **_retval)