Skip to content

Signature::New signature changed in V8 4.2 #308

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

Closed
rvagg opened this issue Apr 12, 2015 · 3 comments
Closed

Signature::New signature changed in V8 4.2 #308

rvagg opened this issue Apr 12, 2015 · 3 comments

Comments

@rvagg
Copy link
Member

rvagg commented Apr 12, 2015

I'm not sure how to tackle this one cause the NanNew stuff has changed quite a bit since I touched it and the split across multiple files has me scratching myself.

I'm trying out io.js next which has V8 4.2.77 and am bumping in to compile problems related to the new signature of this method:

-  static Local<Signature> New(Isolate* isolate,
-                              Handle<FunctionTemplate> receiver =
-                                  Handle<FunctionTemplate>(),
-                              int argc = 0,
-                              Handle<FunctionTemplate> argv[] = 0);
+  static Local<Signature> New(
+      Isolate* isolate,
+      Handle<FunctionTemplate> receiver = Handle<FunctionTemplate>());

Not super-urgent but we only have a couple of weeks before this goes live.

@bnoordhuis
Copy link
Member

Are there any serious users? If there aren't, it's probably easier to remove it.

@kkoopa
Copy link
Collaborator

kkoopa commented Apr 12, 2015

It was removed in this issue. Easiest way does seem like removing the option of setting arguments for signatures. I don't think it's worth it to reimplement a NanSignature wrapper, as this feature is rarely used. If necessary, implementer should do argument checking themselves, as the note states.

@kkoopa
Copy link
Collaborator

kkoopa commented Apr 12, 2015

Change https://github.com/rvagg/nan/blob/master/nan_new.h#L153 to New( FTH receiver = FTH());
Change https://github.com/rvagg/nan/blob/master/nan_implementation_12_inl.h#L177-182 to

Factory<v8::Signature>::return_t
Factory<v8::Signature>::New( Factory<v8::Signature>::FTH receiver) {
  return v8::Signature::New(v8::Isolate::GetCurrent(), receiver);
}

Change https://github.com/rvagg/nan/blob/master/nan_implementation_pre_12_inl.h#183-188 to

Factory<v8::Signature>::return_t
Factory<v8::Signature>::New( Factory<v8::Signature>::FTH receiver) {
  return v8::Signature::New(receiver);
}

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

No branches or pull requests

3 participants