`node::MakeCallback()` API change for v6
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 531
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the node::MakeCallback() and node::AsyncWrap::MakeCallback() entry points and the current nan compatibility surface. Determine how the Node.js v6 return-type and exception-signaling changes affect existing callers. Done means nan supports the changed API while preserving backwards compatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, node.js
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100