Esempio n. 1
0
 private static void ProcessCpuProfile(V8CpuProfile.Ptr pProfile, IntPtr pAction)
 {
     try
     {
         V8ProxyHelpers.GetHostObject <Action <V8CpuProfile.Ptr> >(pAction)(pProfile);
     }
     catch (Exception exception)
     {
         ScheduleHostException(exception);
     }
 }
Esempio n. 2
0
 private static void ProcessArrayBufferOrViewData(IntPtr pData, IntPtr pAction)
 {
     try
     {
         V8ProxyHelpers.GetHostObject <Action <IntPtr> >(pAction)(pData);
     }
     catch (Exception exception)
     {
         ScheduleHostException(exception);
     }
 }
Esempio n. 3
0
 private static void InvokeHostAction(IntPtr pAction)
 {
     try
     {
         V8ProxyHelpers.GetHostObject <Action>(pAction)();
     }
     catch (Exception exception)
     {
         ScheduleHostException(exception);
     }
 }
Esempio n. 4
0
 private static void DestroyDebugAgent(IntPtr pAgent)
 {
     V8ProxyHelpers.GetHostObject <V8DebugAgent>(pAgent).Dispose();
     V8ProxyHelpers.ReleaseHostObject(pAgent);
 }
Esempio n. 5
0
 private static void SendDebugMessage(IntPtr pAgent, StdString.Ptr pContent)
 {
     V8ProxyHelpers.GetHostObject <V8DebugAgent>(pAgent).SendMessage(StdString.GetValue(pContent));
 }
Esempio n. 6
0
 private static bool RemoveV8ObjectCacheEntry(IntPtr pCache, IntPtr pObject)
 {
     return(V8ProxyHelpers.GetHostObject <Dictionary <object, IntPtr> >(pCache).Remove(V8ProxyHelpers.GetHostObject(pObject)));
 }
Esempio n. 7
0
        private static void GetAllCachedV8Objects(IntPtr pCache, StdPtrArray.Ptr pV8ObjectPtrs)
        {
            var cache = V8ProxyHelpers.GetHostObject <Dictionary <object, IntPtr> >(pCache);

            StdPtrArray.CopyFromArray(pV8ObjectPtrs, cache.Values.ToArray());
        }
Esempio n. 8
0
 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);
 }
Esempio n. 9
0
 private static void CacheV8Object(IntPtr pCache, IntPtr pObject, IntPtr pV8Object)
 {
     V8ProxyHelpers.GetHostObject <Dictionary <object, IntPtr> >(pCache).Add(V8ProxyHelpers.GetHostObject(pObject), pV8Object);
 }