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

Rename GC*logueCallback to GCCallback for >4.0 #529

merged 1 commit into from
Jan 8, 2016

Conversation

matthewloring
Copy link
Contributor

Types were unified in https://codereview.chromium.org/1298113003
This change went into v8 4.6 which made it into Node 5. The
GC*logueCallback types have gone away completely in 4.9.

@@ -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 GC_EPILOGUE_CALLBACK_TYPE;
typedef v8::Isolate::GCPrologueCallback GC_PROLOGUE_CALLBACK_TYPE;

This comment was marked as off-topic.

This comment was marked as off-topic.

@agnat
Copy link
Collaborator

agnat commented Jan 6, 2016

Thanks, @matthewloring.

LGTM with one nit.

Types were unified in https://codereview.chromium.org/1298113003
This change went into v8 4.6 which made it into node 5. The
GC*logueCallback types have gone away completely in 4.9.
@kkoopa
Copy link
Collaborator

kkoopa commented Jan 6, 2016

I was going with a different approach, but I guess this could work as a temporary fix as it does not change the external API.

@agnat
Copy link
Collaborator

agnat commented Jan 6, 2016

I was going with a different approach,

Right. I almost forgot about that one...

but I guess this could work as a temporary fix as it does not change the external API.

I'm OK with either one. This one offers a smoother transition while #489 might be a bit more future proof since it offers more ... wiggle room. "Might" because predictions are hard, specially if they concern the future.

BTW, does anybody know an open source add-on that uses the GC*logue stuff? I'm kind of curious what people do with it.

@matthewloring
Copy link
Contributor Author

I'm not familiar with how people use this. I only encountered it when things crashed using nan with node 6.0-pre. I'm also happy with either solution, I was not aware of the other approach before starting this PR.

@kkoopa
Copy link
Collaborator

kkoopa commented Jan 6, 2016

I can merge this and put out a minor update if things don't work or give deprecation warnings in 5.0. Could even merge it regardless, if it happens to help for prereleases of 6. I have been meaning to get out the next minor for a couple of months already, but not gotten around to it, since nothing has been broken yet, AFAIK. The other PR is scheduled for NAN 3.0, which I intend to hold off until Node 6 in April or so.

@agnat Yes, there is one, for which I originally wrote this functionality. I think it was this. I don't know of anything else that uses it.

@matthewloring
Copy link
Contributor Author

I've been experimenting with a branch of Node on top of v8 4.9 and this change is required to make nan work in this context. I believe it is also giving deprecation warnings in 5.0 based on the original v8 commit but I haven't confirmed this personally. It would definitely help me to get this fix in before nan 3.0.

kkoopa added a commit that referenced this pull request Jan 8, 2016
Rename GC*logueCallback to GCCallback for >4.0
@kkoopa kkoopa merged commit 08e69fe into nodejs:master Jan 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants