mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 774585: Fix xpc-sandbox creation code to create the correct principals. r=mrbkap
This commit is contained in:
parent
2ac2ff6877
commit
8538371ed0
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user