-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
src: standardise context embedder indices #19135
src: standardise context embedder indices #19135
Conversation
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.
I'd like someone else more familiar with the postmortem stuff to take a look at that part. Otherwise, LGTM.
cc @nodejs/post-mortem |
src/node_context_data.h
Outdated
#endif | ||
|
||
enum ContextEmbedderIndex { | ||
kEmbedderData = NODE_CONTEXT_EMBEDDER_DATA_INDEX, |
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.
Perhaps kEnvironment
is a better name now.
6ec91af
to
fb1844c
Compare
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.
CI: https://ci.nodejs.org/job/node-test-pull-request/13515/
Can't comment on the postmortem parts either, but cc @joyeecheung as a heads up to the llnode folks.
Also @mmarchini |
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.
LGTM
Unspecified failure on one of the linux cases, from the failure it's not clear if it's unrelated although looking at the test it should be. Running again just to be safe: https://ci.nodejs.org/job/node-test-commit-linux/16891/ |
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.
LGTM. I'd rename the node_context_data.h
file to just context_data.h
.
// Context::SetAlignedPointerInEmbedderData() is backed by a FixedArray, | ||
// worst case we pay a one-time penalty for resizing the array. | ||
#ifndef NODE_CONTEXT_EMBEDDER_DATA_INDEX | ||
#define NODE_CONTEXT_EMBEDDER_DATA_INDEX 32 |
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.
Could rename this EMBEDDER_DATA
to ENVIRONMENT
as well?
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.
i suspect renaming this would require a docs deprecation for all of v10 and then landing this pr on v11?
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.
This macro used to be in env.h
, which is not a public header.
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.
@devsnek raised the argument of Node.js embedding over IRC. I'm fine with removing this macro after a major bump then.
landed in c9b4de5 |
PR-URL: #19135 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com>
Is it OK to land this on v9.x? I'm not sure if it changes the public API |
when this lands on v9.x it causes compilation to break 😢
|
PR-URL: nodejs#19135 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com>
Should this be backported to 8.x? If so, a separate backport PR is needed. |
i'll be adding another one with #19016 so i'd like to keep track of them all a little better
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
src