Bug 774585: Fix xpc-sandbox creation code to create the correct principals. r=mrbkap

This commit is contained in:
Jonas Sicking 2012-07-21 00:29:40 -07:00
parent 2ac2ff6877
commit 8538371ed0

View File

@ -3398,7 +3398,10 @@ GetPrincipalFromString(JSContext *cx, JSString *codebase, nsIPrincipal **princip
do_GetService(kScriptSecurityManagerContractID);
NS_ENSURE_TRUE(secman, NS_ERROR_FAILURE);
rv = secman->GetCodebasePrincipal(uri, principal);
// We could allow passing in the app-id and browser-element info to the
// sandbox constructor. But creating a sandbox based on a string is a
// deprecated API so no need to add features to it.
rv = secman->GetNoAppCodebasePrincipal(uri, principal);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(*principal, NS_ERROR_FAILURE);