internal static void get_cookie_manager(IntPtr gcHandlePtr, out IntPtr __retval)
        {
            var self = (CfxRequestContextHandler)System.Runtime.InteropServices.GCHandle.FromIntPtr(gcHandlePtr).Target;

            if (self == null || self.CallbacksDisabled)
            {
                __retval = default(IntPtr);
                return;
            }
            var e = new CfxGetCookieManagerEventArgs();

            self.m_GetCookieManager?.Invoke(self, e);
            e.m_isInvalid = true;
            __retval      = CfxCookieManager.Unwrap(e.m_returnValue);
        }
        /// <summary>
        /// Retrieves the CfxCookieManager provided by the event handler attached to the GetCookieManager event, if any.
        /// Returns null if no event handler is attached.
        /// </summary>
        public CfxCookieManager RetrieveCookieManager()
        {
            var h = m_GetCookieManager;

            if (h != null)
            {
                var e = new CfxGetCookieManagerEventArgs();
                h(this, e);
                return(e.m_returnValue);
            }
            else
            {
                return(null);
            }
        }