예제 #1
0
 internal static CfxV8StackFrame Wrap(IntPtr nativePtr)
 {
     if (nativePtr == IntPtr.Zero)
     {
         return(null);
     }
     lock (weakCache) {
         var wrapper = (CfxV8StackFrame)weakCache.Get(nativePtr);
         if (wrapper == null)
         {
             wrapper = new CfxV8StackFrame(nativePtr);
             weakCache.Add(wrapper);
         }
         else
         {
             CfxApi.cfx_release(nativePtr);
         }
         return(wrapper);
     }
 }
예제 #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 CfxV8StackFrame GetFrame(int index)
 {
     return(CfxV8StackFrame.Wrap(CfxApi.V8StackTrace.cfx_v8stack_trace_get_frame(NativePtr, index)));
 }