From 81ec9d746fd0c94422524a9eb30216809259106c Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Fri, 6 Jul 2018 18:16:23 +0200 Subject: [PATCH] Bug 1472973 part 4 - Use JS::GetNonCCWObjectGlobal in PrefableDisablers::isEnabled. r=bz --- dom/bindings/DOMJSClass.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dom/bindings/DOMJSClass.h b/dom/bindings/DOMJSClass.h index 41168ea412a5..d6356e59957b 100644 --- a/dom/bindings/DOMJSClass.h +++ b/dom/bindings/DOMJSClass.h @@ -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;