MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / GetContext

Method GetContext

napi-inl.h:6180–6188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6178 typename DataType,
6179 void (*CallJs)(Napi::Env, Napi::Function, ContextType*, DataType*)>
6180inline ContextType*
6181TypedThreadSafeFunction<ContextType, DataType, CallJs>::GetContext() const {
6182 void* context;
6183 napi_status status = napi_get_threadsafe_function_context(_tsfn, &context);
6184 NAPI_FATAL_IF_FAILED(status,
6185 "TypedThreadSafeFunction::GetContext",
6186 "napi_get_threadsafe_function_context");
6187 return static_cast<ContextType*>(context);
6188}
6189
6190// static
6191template <typename ContextType,

Callers

nothing calls this directly

Calls 1

ConvertibleContextClass · 0.85

Tested by

no test coverage detected