MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / RunInCallbackScope

Function RunInCallbackScope

test/callbackscope.cc:9–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace {
8
9static void RunInCallbackScope(const CallbackInfo& info) {
10 Function callback = info[0].As<Function>();
11 AsyncContext context(info.Env(), "callback_scope_test");
12 CallbackScope scope(info.Env(), context);
13 callback.Call({});
14}
15
16static void RunInCallbackScopeFromExisting(const CallbackInfo& info) {
17 Function callback = info[0].As<Function>();

Callers

nothing calls this directly

Calls 2

EnvMethod · 0.80
CallMethod · 0.80

Tested by

no test coverage detected