private static void ProcessCpuProfile(V8CpuProfile.Ptr pProfile, IntPtr pAction) { try { V8ProxyHelpers.GetHostObject <Action <V8CpuProfile.Ptr> >(pAction)(pProfile); } catch (Exception exception) { ScheduleHostException(exception); } }
private static void ProcessArrayBufferOrViewData(IntPtr pData, IntPtr pAction) { try { V8ProxyHelpers.GetHostObject <Action <IntPtr> >(pAction)(pData); } catch (Exception exception) { ScheduleHostException(exception); } }
private static void InvokeHostAction(IntPtr pAction) { try { V8ProxyHelpers.GetHostObject <Action>(pAction)(); } catch (Exception exception) { ScheduleHostException(exception); } }
private static void DestroyDebugAgent(IntPtr pAgent) { V8ProxyHelpers.GetHostObject <V8DebugAgent>(pAgent).Dispose(); V8ProxyHelpers.ReleaseHostObject(pAgent); }
private static void SendDebugMessage(IntPtr pAgent, StdString.Ptr pContent) { V8ProxyHelpers.GetHostObject <V8DebugAgent>(pAgent).SendMessage(StdString.GetValue(pContent)); }
private static bool RemoveV8ObjectCacheEntry(IntPtr pCache, IntPtr pObject) { return(V8ProxyHelpers.GetHostObject <Dictionary <object, IntPtr> >(pCache).Remove(V8ProxyHelpers.GetHostObject(pObject))); }
private static void GetAllCachedV8Objects(IntPtr pCache, StdPtrArray.Ptr pV8ObjectPtrs) { var cache = V8ProxyHelpers.GetHostObject <Dictionary <object, IntPtr> >(pCache); StdPtrArray.CopyFromArray(pV8ObjectPtrs, cache.Values.ToArray()); }
private static IntPtr GetCachedV8Object(IntPtr pCache, IntPtr pObject) { return(V8ProxyHelpers.GetHostObject <Dictionary <object, IntPtr> >(pCache).TryGetValue(V8ProxyHelpers.GetHostObject(pObject), out IntPtr pV8Object) ? pV8Object : IntPtr.Zero); }
private static void CacheV8Object(IntPtr pCache, IntPtr pObject, IntPtr pV8Object) { V8ProxyHelpers.GetHostObject <Dictionary <object, IntPtr> >(pCache).Add(V8ProxyHelpers.GetHostObject(pObject), pV8Object); }