Bug 777135 - Part 1: Add nice C++ version of nsIPrincipal::GetAppStatus. r=mounir

--HG--
extra : rebase_source : 6150a2b708faa41f1f6c7723260fc52444b7ea8d
This commit is contained in:
Justin Lebar 2012-08-13 12:58:38 -04:00
parent 4dcffa2862
commit ba21663f76

View File

@ -240,6 +240,18 @@ interface nsIPrincipal : nsISerializable
*/
readonly attribute unsigned short appStatus;
%{C++
PRUint16 GetAppStatus()
{
PRUint16 appStatus;
nsresult rv = GetAppStatus(&appStatus);
if (NS_FAILED(rv)) {
return APP_STATUS_NOT_INSTALLED;
}
return appStatus;
}
%}
/**
* Returns the app id the principal is in, or returns
* nsIScriptSecurityManager::NO_APP_ID if this principal isn't part of an