| 14 | static Persistent<v8::Function> cb; |
| 15 | |
| 16 | void weakCallback( |
| 17 | const WeakCallbackInfo<int> &data) { // NOLINT(runtime/references) |
| 18 | HandleScope scope; |
| 19 | int *parameter = data.GetParameter(); |
| 20 | v8::Local<v8::Value> val = New(*parameter); |
| 21 | async_resource->runInAsyncScope( |
| 22 | GetCurrentContext()->Global(), New(cb), 1, &val); |
| 23 | delete async_resource; |
| 24 | delete parameter; |
| 25 | } |
| 26 | |
| 27 | v8::Local<v8::String> wrap(v8::Local<v8::Function> func) { |
| 28 | EscapableHandleScope scope; |
nothing calls this directly
no test coverage detected