| 58 | struct callback_helper { |
| 59 | |
| 60 | struct callback_args { |
| 61 | |
| 62 | Nan::Persistent<Function, Nan::CopyablePersistentTraits<Function> >* callback; |
| 63 | char **stack; |
| 64 | size_t stack_size; |
| 65 | int signo; |
| 66 | long addr; |
| 67 | pthread_mutex_t mutex; |
| 68 | pthread_cond_t cond; |
| 69 | |
| 70 | callback_args(Nan::Persistent<Function, Nan::CopyablePersistentTraits<Function> >* callback, void * const* stack, size_t stack_size, int signo, long addr) : |
| 71 | callback(callback), stack(backtrace_symbols(stack, stack_size)), stack_size(stack_size), signo(signo), addr(addr) { |
| 72 | pthread_mutex_init(&mutex, NULL); |
| 73 | pthread_cond_init(&cond, NULL); |
| 74 | } |
| 75 | |
| 76 | ~callback_args() { |
| 77 | free(stack); |
| 78 | pthread_mutex_destroy(&mutex); |
| 79 | pthread_cond_destroy(&cond); |
| 80 | } |
| 81 | }; |
| 82 | |
| 83 | uv_async_t* handle; |
| 84 | Nan::Persistent<Function, Nan::CopyablePersistentTraits<Function> > callback; |
nothing calls this directly
no outgoing calls
no test coverage detected