diff --git a/toolkit/components/ctypes/ctypes.cpp b/toolkit/components/ctypes/ctypes.cpp index 79cecfc466af..0a02deb3cb54 100644 --- a/toolkit/components/ctypes/ctypes.cpp +++ b/toolkit/components/ctypes/ctypes.cpp @@ -113,11 +113,7 @@ Module::Call(nsIXPConnectWrappedNative* wrapper, jsval* vp, PRBool* _retval) { - JSObject* scope = JS_GetScopeChain(cx); - if (!scope) - return NS_ERROR_NOT_AVAILABLE; - - JSObject* global = JS_GetGlobalForObject(cx, scope); + JSObject* global = JS_GetGlobalForScopeChain(cx); if (!global) return NS_ERROR_NOT_AVAILABLE;