diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp index 256c7b34f79f..fbe901033ccf 100644 --- a/js/xpconnect/wrappers/XrayWrapper.cpp +++ b/js/xpconnect/wrappers/XrayWrapper.cpp @@ -127,7 +127,7 @@ XrayAwareCalleeGlobal(JSObject* fun) if (!js::FunctionHasNativeReserved(fun)) { // Just a normal function, no Xrays involved. - return js::GetGlobalForObjectCrossCompartment(fun); + return JS::GetNonCCWObjectGlobal(fun); } // The functions we expect here have the Xray wrapper they're associated with