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

Function NAN_METHOD

test/cpp/isolatedata.cpp:17–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15};
16
17NAN_METHOD(SetAndGet) {
18 Dummy *d0 = new Dummy;
19 Dummy *d1 = NULL;
20
21 v8::Isolate *isolate = v8::Isolate::GetCurrent();
22
23 SetIsolateData<Dummy>(isolate, d0);
24 d1 = GetIsolateData<Dummy>(isolate);
25
26 delete d1;
27
28 info.GetReturnValue().Set(New<v8::Boolean>(d0 == d1));
29}
30
31NAN_MODULE_INIT(Init) {
32 Set(target

Callers

nothing calls this directly

Calls 2

SetMethod · 0.45
GetReturnValueMethod · 0.45

Tested by

no test coverage detected