/// <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))); }
/// <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)); }
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); } }
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); } }