Skip to content

smalloc: extend user API - #905

Closed
trevnorris wants to merge 1 commit into
nodejs:v1.xfrom
trevnorris:extend-smalloc
Closed

trevnorris wants to merge 1 commit into
nodejs:v1.xfrom
trevnorris:extend-smalloc

Conversation

@trevnorris

Copy link
Copy Markdown
Contributor

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

Comment thread src/smalloc.cc Outdated

Copy link
Copy Markdown
Contributor

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)?

Copy link
Copy Markdown
Contributor Author

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.

@indutny

indutny commented Feb 20, 2015

Copy link
Copy Markdown
Member

LGTM, if it works

Comment thread src/smalloc.h

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor Author

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"
@trevnorris

Copy link
Copy Markdown
Contributor Author

@vkurchatkin addressed comments. thanks.

trevnorris added a commit that referenced this pull request Feb 20, 2015
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 <fedor@indutny.com>
@trevnorris

Copy link
Copy Markdown
Contributor Author

Landed in 26ebe98.

@trevnorris trevnorris closed this Feb 20, 2015
@trevnorris
trevnorris deleted the extend-smalloc branch February 20, 2015 18:09
trevnorris added a commit to nodejs/node-v0.x-archive that referenced this pull request Feb 20, 2015
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 <fedor@indutny.com>
@rvagg

rvagg commented Feb 22, 2015

Copy link
Copy Markdown
Member

should this have the semver-minor tag? is it a feature add?

@trevnorris

Copy link
Copy Markdown
Contributor Author

@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 Environment was added as an API argument, thus making it impossible to use from a native module.

This was referenced Feb 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants