mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 790905 - Make the compartment principal of autoconfig_glob match the principal passed to JS::Evaluate. r=bz
This commit is contained in:
parent
884e392327
commit
4146acd0bd
@ -131,7 +131,10 @@ nsresult CentralizedAdminPrefManagerInit()
|
||||
static_cast<nsIXPCSecurityManager*>(new AutoConfigSecMan());
|
||||
xpc->SetSecurityManagerForJSContext(autoconfig_cx, secman, 0);
|
||||
|
||||
autoconfig_glob = JS_NewGlobalObject(autoconfig_cx, &global_class, NULL);
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
nsContentUtils::GetSecurityManager()->GetSystemPrincipal(getter_AddRefs(principal));
|
||||
autoconfig_glob = JS_NewGlobalObject(autoconfig_cx, &global_class, nsJSPrincipals::get(principal));
|
||||
if (autoconfig_glob) {
|
||||
JSAutoCompartment ac(autoconfig_cx, autoconfig_glob);
|
||||
if (JS_InitStandardClasses(autoconfig_cx, autoconfig_glob)) {
|
||||
|
Loading…
Reference in New Issue
Block a user