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