예제 #1
0
        /// <summary>
        /// Returns the stack frame at the specified 0-based index.
        /// </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 CfrV8StackFrame GetFrame(int index)
        {
            var call = new CfxV8StackTraceGetFrameRemoteCall();

            call.@this = RemotePtr.ptr;
            call.index = index;
            call.RequestExecution(RemotePtr.connection);
            return(CfrV8StackFrame.Wrap(new RemotePtr(call.__retval)));
        }
예제 #2
0
        /// <summary>
        /// Returns the stack frame at the specified 0-based index.
        /// </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 CfrV8StackFrame GetFrame(int index)
        {
            var call = new CfxV8StackTraceGetFrameRenderProcessCall();

            call.self  = CfrObject.Unwrap(this);
            call.index = index;
            call.RequestExecution(this);
            return(CfrV8StackFrame.Wrap(call.__retval));
        }
예제 #3
0
        internal static CfrV8StackFrame Wrap(IntPtr proxyId)
        {
            if (proxyId == IntPtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrV8StackFrame)weakCache.Get(proxyId);
                if (cfrObj == null)
                {
                    cfrObj = new CfrV8StackFrame(proxyId);
                    weakCache.Add(proxyId, cfrObj);
                }
                return(cfrObj);
            }
        }
예제 #4
0
        internal static CfrV8StackFrame Wrap(RemotePtr remotePtr)
        {
            if (remotePtr == RemotePtr.Zero)
            {
                return(null);
            }
            var weakCache = CfxRemoteCallContext.CurrentContext.connection.weakCache;

            lock (weakCache) {
                var cfrObj = (CfrV8StackFrame)weakCache.Get(remotePtr.ptr);
                if (cfrObj == null)
                {
                    cfrObj = new CfrV8StackFrame(remotePtr);
                    weakCache.Add(remotePtr.ptr, cfrObj);
                }
                return(cfrObj);
            }
        }