Beispiel #1
0
        public void Action()
        {
            jsEnv.CheckLiveness();
            IntPtr resultInfo = PuertsDLL.InvokeJSFunction(nativeJsFuncPtr, false);

            if (resultInfo == IntPtr.Zero)
            {
                string exceptionInfo = PuertsDLL.GetFunctionLastExceptionInfo(nativeJsFuncPtr);
                throw new Exception(exceptionInfo);
            }
        }
        public void Action()
        {
#if THREAD_SAFE
            lock (jsEnv) {
#endif
            jsEnv.CheckLiveness();
            IntPtr resultInfo = InvokeJSFunction(
                jsEnv, nativeJsFuncPtr, 0, false,
                (IntPtr isolate, int envIdx, IntPtr nativeJsFuncPtr) => {}
                );
            if (resultInfo == IntPtr.Zero)
            {
                string exceptionInfo = PuertsDLL.GetFunctionLastExceptionInfo(nativeJsFuncPtr);
                throw new Exception(exceptionInfo);
            }
#if THREAD_SAFE
        }
#endif
        }