mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 671482 - Use the trusted principal to identify the system principal. r=luke.
This commit is contained in:
parent
bc2ec1e581
commit
df63e69bd3
@ -2878,7 +2878,8 @@ NewCompartment(JSContext *cx, JSPrincipals *principals)
|
||||
JSRuntime *rt = cx->runtime;
|
||||
JSCompartment *compartment = cx->new_<JSCompartment>(rt);
|
||||
if (compartment && compartment->init()) {
|
||||
compartment->isSystemCompartment = principals && !strcmp(principals->codebase, "[System Principal]");
|
||||
// The trusted compartment is a system compartment.
|
||||
compartment->isSystemCompartment = principals && rt->trustedPrincipals() == principals;
|
||||
if (principals) {
|
||||
compartment->principals = principals;
|
||||
JSPRINCIPALS_HOLD(cx, principals);
|
||||
|
Loading…
Reference in New Issue
Block a user