-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
lib: deprecate the smalloc module #1564
Conversation
Upcoming V8 changes will make it impossible to keep supporting the smalloc module so deprecate it now and tell people to switch to typed arrays. The module is used in core in a few places so this commit makes the public module private and replaces the public part with wrappers that print deprecation notices. PR-URL: nodejs#1564 Reviewed-By: Domenic Denicola <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
return false; | ||
|
||
return smalloc.hasExternalData(obj); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib/smalloc.js was moved to lib/internal/smalloc.js, then a stub lib/smalloc.js. Unfortunately, git/github doesn't quite fathom that and the diff is noisier because of it.
LGTM but would prefer @trevnorris's sign-off. |
@bnoordhuis Have we deprecated Changes as they are LGTM. |
0f929ca
to
d5ce47e
Compare
I think this is a first. I'll open another PR for that. |
Fare thee well |
Are doc changes being committed in separately? |
Wups, I forgot to commit that. I'll open a new pull request for that. |
Upcoming V8 changes will make it impossible to keep supporting the
smalloc module so deprecate it now and tell people to switch to
typed arrays.
The module is used in core in a few places so this commit makes the
public module private and replaces the public part with wrappers that
print deprecation notices.
R=@domenic @trevnorris
TBD: Deprecate src/smalloc.h as well? Probably a good thing but the header is used when building core and deprecation warnings would be annoying (although I guess it could be made conditional on NODE_WANT_INTERNALS.)