nan
nan copied to clipboard
`node::MakeCallback()` API change for v6
Currently node::MakeCallback() returns Local<Value>. This is problematic for two reasons:
-
node::AsyncWrap::MakeCallback()returns aLocal<Value>()if there's an exception. While the PR hasn't been done, before v6 it will return aMaybeLocal<Value>. - Recursive
MakeCallback()calls depends on knowing if an exception was thrown. This is impossible to do sinceUndefined()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
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.