mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1472973 part 4 - Use JS::GetNonCCWObjectGlobal in PrefableDisablers::isEnabled. r=bz
This commit is contained in:
parent
09149a5c4a
commit
81ec9d746f
@ -121,7 +121,7 @@ struct PrefableDisablers {
|
||||
// globals; our IDL parser enforces that. So as long as we check our
|
||||
// exposure set before checking "enabled" we will be ok.
|
||||
if (nonExposedGlobals &&
|
||||
IsNonExposedGlobal(cx, js::GetGlobalForObjectCrossCompartment(obj),
|
||||
IsNonExposedGlobal(cx, JS::GetNonCCWObjectGlobal(obj),
|
||||
nonExposedGlobals)) {
|
||||
return false;
|
||||
}
|
||||
@ -131,8 +131,7 @@ struct PrefableDisablers {
|
||||
if (secureContext && !IsSecureContextOrObjectIsFromSecureContext(cx, obj)) {
|
||||
return false;
|
||||
}
|
||||
if (enabledFunc &&
|
||||
!enabledFunc(cx, js::GetGlobalForObjectCrossCompartment(obj))) {
|
||||
if (enabledFunc && !enabledFunc(cx, JS::GetNonCCWObjectGlobal(obj))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user