V8 internals
The hooks to access V8 internals—including GC and statistics—are different across the supported versions of V8, therefore NAN provides its own hooks that call the appropriate V8 methods.
NAN_GC_CALLBACK(callbackname)
Use NAN_GC_CALLBACK
to declare your callbacks for Nan::AddGCPrologueCallback()
and Nan::AddGCEpilogueCallback()
. Your new method receives the arguments v8::GCType type
and v8::GCCallbackFlags flags
.
Nan::AddGCEpilogueCallback()
Signature:
Calls V8's AddGCEpilogueCallback()
.
Nan::RemoveGCEpilogueCallback()
Signature:
Calls V8's RemoveGCEpilogueCallback()
.
Nan::AddGCPrologueCallback()
Signature:
Calls V8's AddGCPrologueCallback()
.
Nan::RemoveGCPrologueCallback()
Signature:
Calls V8's RemoveGCEpilogueCallback()
.
Nan::GetHeapStatistics()
Signature:
Calls V8's GetHeapStatistics()
.
Nan::SetCounterFunction()
Signature:
Calls V8's SetCounterFunction()
.
Nan::SetCreateHistogramFunction()
Signature:
Calls V8's SetCreateHistogramFunction()
.
Nan::SetAddHistogramSampleFunction()
Signature:
Calls V8's SetAddHistogramSampleFunction()
.
Nan::IdleNotification()
Signature:
Calls V8's IdleNotification()
or IdleNotificationDeadline()
depending on V8 version.
Nan::LowMemoryNotification()
Signature:
Calls V8's IdleNotification()
.
Nan::ContextDisposedNotification()
Signature:
Calls V8's ContextDisposedNotification()
.
Nan::GetInternalFieldPointer()
Gets a pointer to the internal field with at index
from a V8 Object
handle.
Signature:
Calls the Object's GetAlignedPointerFromInternalField()
or GetPointerFromInternalField()
depending on the version of V8.
Nan::SetInternalFieldPointer()
Sets the value of the internal field at index
on a V8 Object
handle.
Signature:
Calls the Object's SetAlignedPointerInInternalField()
or SetPointerInInternalField()
depending on the version of V8.
Nan::AdjustExternalMemory()
Signature:
Calls V8's AdjustAmountOfExternalAllocatedMemory()
.
Last updated