コード例 #1
0
ファイル: CfrV8StackTrace.cs プロジェクト: 386845154a/NanUI-1
        /// <summary>
        /// Returns the stack trace for the currently active context. |frameLimit| is
        /// the maximum number of frames that will be captured.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>.
        /// </remarks>
        public static CfrV8StackTrace GetCurrent(int frameLimit)
        {
            var call = new CfxV8StackTraceGetCurrentRemoteCall();

            call.frameLimit = frameLimit;
            call.RequestExecution();
            return(CfrV8StackTrace.Wrap(new RemotePtr(call.__retval)));
        }
コード例 #2
0
ファイル: CfrV8StackTrace.cs プロジェクト: xmcy0011/NanUI
        /// <summary>
        /// Returns the stack trace for the currently active context. |frameLimit| is
        /// the maximum number of frames that will be captured.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>.
        /// </remarks>
        public static CfrV8StackTrace GetCurrent(int frameLimit)
        {
            var call = new CfxV8StackTraceGetCurrentRenderProcessCall();

            call.frameLimit = frameLimit;
            call.RequestExecution(CfxRemoteCallContext.CurrentContext.connection);
            return(CfrV8StackTrace.Wrap(call.__retval));
        }
コード例 #3
0
ファイル: CfrV8StackTrace.cs プロジェクト: 386845154a/NanUI-1
        internal static CfrV8StackTrace Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrV8StackTrace)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrV8StackTrace(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }
コード例 #4
0
ファイル: CfrV8StackTrace.cs プロジェクト: xmcy0011/NanUI
        internal static CfrV8StackTrace Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrV8StackTrace)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrV8StackTrace(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }