Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename GC*logueCallback to GCCallback for >4.0 #529

Merged
merged 1 commit into from
Jan 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -598,25 +598,33 @@ class TryCatch {
# define NAN_GC_CALLBACK(name) \
void name(v8::Isolate *isolate, v8::GCType type, v8::GCCallbackFlags flags)

#if NODE_MODULE_VERSION <= NODE_4_0_MODULE_VERSION
typedef v8::Isolate::GCEpilogueCallback GCEpilogueCallback;
typedef v8::Isolate::GCPrologueCallback GCPrologueCallback;
#else
typedef v8::Isolate::GCCallback GCEpilogueCallback;
typedef v8::Isolate::GCCallback GCPrologueCallback;
#endif

NAN_INLINE void AddGCEpilogueCallback(
v8::Isolate::GCEpilogueCallback callback
GCEpilogueCallback callback
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
v8::Isolate::GetCurrent()->AddGCEpilogueCallback(callback, gc_type_filter);
}

NAN_INLINE void RemoveGCEpilogueCallback(
v8::Isolate::GCEpilogueCallback callback) {
GCEpilogueCallback callback) {
v8::Isolate::GetCurrent()->RemoveGCEpilogueCallback(callback);
}

NAN_INLINE void AddGCPrologueCallback(
v8::Isolate::GCPrologueCallback callback
GCPrologueCallback callback
, v8::GCType gc_type_filter = v8::kGCTypeAll) {
v8::Isolate::GetCurrent()->AddGCPrologueCallback(callback, gc_type_filter);
}

NAN_INLINE void RemoveGCPrologueCallback(
v8::Isolate::GCPrologueCallback callback) {
GCPrologueCallback callback) {
v8::Isolate::GetCurrent()->RemoveGCPrologueCallback(callback);
}

Expand Down