Some cases aren't handled properly
Firstly I want to say thanks, the app is very handy.
As far as I've noticed from the source code there are some cases that aren't handled properly (most of them I've found from my last comment to update_to_nan_v2.0.x.sh gist by @thlorenz):
- v8::Local<v8::FunctionTemplate> tpl = NanNew<v8::FunctionTemplate>(New);
tpl->SetClassName(NanNew<v8::String>(className));
+ v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
tpl->SetClassName(Nan::New<v8::String>(className));
As far as I understand the code above should become:
tpl->SetClassName(Nan::New<v8::String>(className).ToLocalChecked()); // `ToLocalChecked()` results should be passed to `SetClassName()`
The same goes to this part:
- target->Set(NanNew<v8::String>(className), tpl->GetFunction());
+ target->Set(Nan::New<v8::String>(className), tpl->GetFunction());
It should become
target->Set(Nan::New<v8::String>(className).ToLocalChecked(), tpl->GetFunction());
The code:
NanAssignPersistent<v8::Function>(constructor, tpl->GetFunction());
stays untouched and I believe it's because of this \w+ rule in NanAssignPersistent regexp.
@narqo Thanks a lot! we are reviewing it, we'll let you know any advance
@narqo first case is solved in the new version 1.0.3 and we have a pending discussion for the second one, will leave the issue open in the meantime and expect an update next week
Thanks for reporting
@edsadr nice to hear that, thanks!