зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1464374 part 3 - Use GetRealmPrincipals in generated bindings to get subject principal. r=bz
This commit is contained in:
Родитель
ce3eb7d5c0
Коммит
b1ff59e919
|
@ -7236,9 +7236,9 @@ class CGCallGenerator(CGThing):
|
|||
|
||||
getPrincipal = fill(
|
||||
"""
|
||||
JSCompartment* compartment = js::GetContextCompartment(cx);
|
||||
MOZ_ASSERT(compartment);
|
||||
JSPrincipals* principals = JS_GetCompartmentPrincipals(compartment);
|
||||
JS::Realm* realm = js::GetContextRealm(cx);
|
||||
MOZ_ASSERT(realm);
|
||||
JSPrincipals* principals = JS::GetRealmPrincipals(realm);
|
||||
nsIPrincipal* principal = nsJSPrincipals::get(principals);
|
||||
${checkPrincipal}
|
||||
""",
|
||||
|
|
Загрузка…
Ссылка в новой задаче