nan icon indicating copy to clipboard operation
nan copied to clipboard

`node::MakeCallback()` API change for v6

Open trevnorris opened this issue 9 years ago • 1 comments

Currently node::MakeCallback() returns Local<Value>. This is problematic for two reasons:

  1. node::AsyncWrap::MakeCallback() returns a Local<Value>() if there's an exception. While the PR hasn't been done, before v6 it will return a MaybeLocal<Value>.
  2. Recursive MakeCallback() calls depends on knowing if an exception was thrown. This is impossible to do since Undefined() is a valid return value.

It should be easy to get around this for backwards compatibility, but would like to make sure nan is ready for the change.

/cc @nodejs/addon-api

trevnorris avatar Mar 23 '16 23:03 trevnorris

Good to know. I presume there will be a couple other breaking changes as well, but nothing as major as last year. That ought to mean we can do the right thing and add this change to the breakage list.

However, nothing is final yet regarding what to break. I'll have a look at the state of breakage once release candidates start appearing and I manage to find time.

kkoopa avatar Mar 23 '16 23:03 kkoopa