MCPcopy Create free account
hub / github.com/nodejs/nan / NAN_METHOD

Function NAN_METHOD

test/cpp/callbackcontext.cpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48NAN_METHOD(Delay) {
49 int delay = To<int>(info[0]).FromJust();
50 v8::Local<v8::Function> cb = To<v8::Function>(info[1]).ToLocalChecked();
51
52 DelayRequest* delay_request = new DelayRequest(delay, cb);
53
54 uv_queue_work(
55 GetCurrentEventLoop()
56 , &delay_request->request
57 , Delay
58 , reinterpret_cast<uv_after_work_cb>(AfterDelay));
59}
60
61NAN_MODULE_INIT(Init) {
62 Set(target, New<v8::String>("delay").ToLocalChecked(),

Callers

nothing calls this directly

Calls 3

GetCurrentEventLoopFunction · 0.85
FromJustMethod · 0.80
ToLocalCheckedMethod · 0.80

Tested by

no test coverage detected