mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1164292 - Properly implement nsExpandedPrincipal::GetOrigin. r=gabor
This commit is contained in:
parent
5bf76b579d
commit
d664bc7478
@ -774,7 +774,19 @@ nsExpandedPrincipal::SetDomain(nsIURI* aDomain)
|
||||
NS_IMETHODIMP
|
||||
nsExpandedPrincipal::GetOrigin(nsACString& aOrigin)
|
||||
{
|
||||
aOrigin.AssignLiteral(EXPANDED_PRINCIPAL_SPEC);
|
||||
aOrigin.AssignLiteral("[Expanded Principal [");
|
||||
for (size_t i = 0; i < mPrincipals.Length(); ++i) {
|
||||
if (i != 0) {
|
||||
aOrigin.AppendLiteral(", ");
|
||||
}
|
||||
|
||||
nsAutoCString subOrigin;
|
||||
nsresult rv = mPrincipals.ElementAt(i)->GetOrigin(subOrigin);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aOrigin.Append(subOrigin);
|
||||
}
|
||||
|
||||
aOrigin.Append("]]");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user