-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
smalloc: extend user API #905
Conversation
|
||
|
||
void AllocDispose(Isolate* isolate, Handle<Object> obj) { | ||
AllocDispose(isolate, 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.
shouldn't it be AllocDispose(Environment::GetCurrent(isolate), 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.
hehe. i'll add that to the test.
LGTM, if it works |
|
||
|
||
// Internal use | ||
void Alloc(Environment* env, |
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.
Maybe move it to smalloc-internal.h
?
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.
If so then I'd recommend doing that in a different PR, and doing with all other headers that do the same (e.g. node_buffer.h
).
node::Environment isn't accessible to user APIs, so extend smalloc to also accept v8::Isolate. Fixes: 75adde0 "src: remove `node_isolate` from source"
ee61b42
to
ba10fd7
Compare
@vkurchatkin addressed comments. thanks. |
node::Environment isn't accessible to user APIs, so extend smalloc to also accept v8::Isolate. Fixes: 75adde0 "src: remove `node_isolate` from source" PR-URL: #905 Reviewed-by: Fedor Indutny <[email protected]>
Landed in 26ebe98. |
node::Environment isn't accessible to user APIs, so extend smalloc to also accept v8::Isolate. Fixes: 75adde0 "src: remove `node_isolate` from source" PR-URL: nodejs/node#905 Reviewed-by: Fedor Indutny <[email protected]>
should this have the semver-minor tag? is it a feature add? |
@rvagg No. It's a fix to an unusable API. Check the "Fixes" in the commit message for the commit that broke it. This happened when |
node::Environment isn't accessible to user APIs, so extend smalloc to
also accept v8::Isolate.
Fixes: 75adde0 "src: remove
node_isolate
from source"R=@bnoordhuis
R=@indutny