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

Method AsyncResource

nan.h:587–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585class AsyncResource {
586 public:
587 AsyncResource(
588 v8::Local<v8::String> name
589 , v8::Local<v8::Object> resource = New<v8::Object>()) {
590#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
591 v8::Isolate* isolate = v8::Isolate::GetCurrent();
592
593 if (resource.IsEmpty()) {
594 resource = New<v8::Object>();
595 }
596
597 context = node::EmitAsyncInit(isolate, resource, name);
598#endif
599 }
600
601 AsyncResource(
602 const char* name

Callers

nothing calls this directly

Calls 2

ToLocalCheckedMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected