Uh oh!
There was an error while loading. Please reload this page.
[v18.x] src: per-realm binding data - #47174
Closed
legendecas wants to merge 1 commit into
Closed
Conversation
nodejs-github-bot
commented
Mar 20, 2023
Collaborator
Review requested:
|
nodejs-github-bot
commented
Apr 2, 2023
Collaborator
anonrig
approved these changes
Apr 2, 2023
danielleadams
commented
May 17, 2023
Contributor
@legendecas are you able to restart the ASan test to confirm it passes before landing in v18? Thanks! |
Binding data is inherited from BaseObject and created in a specific realm. They need to be tracked on a per-realm basis so that they can be released properly when a realm is disposed. PR-URL: nodejs#46556 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> # Conflicts: # src/dataqueue/queue.cc
legendecasforce-pushed
the
backport-46556-to-18
branch
from
May 18, 2023 17:40
4740107 to
125af5cComparelegendecas
commented
May 18, 2023
MemberAuthor
Seems like I can not restart the ASan action either. I've rebased the branch on the tip of v18.x-staging. |
nodejs-github-bot
commented
May 19, 2023
Collaborator
danielleadams
commented
May 29, 2023
Contributor
Landed in 0b92035 |
danielleadams pushed a commit
that referenced
this pull request
May 29, 2023
Binding data is inherited from BaseObject and created in a specific realm. They need to be tracked on a per-realm basis so that they can be released properly when a realm is disposed. PR-URL: #46556 Backport-PR-URL: #47174 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> # Conflicts: # src/dataqueue/queue.cc
hybrist
reviewed
Jul 16, 2023
| context->SetAlignedPointerInEmbedderData( | ||
| ContextEmbedderIndex::kBindingListIndex, &(this->bindings_)); | ||
| ContextEmbedderIndex::kBindingDataStoreIndex, | ||
| realm->binding_data_store()); |
Contributor
There was a problem hiding this comment.
This function is called from node_contextify.cc like this:
env->AssignToContext(v8_context, nullptr, info);This appears to get an invalid value in that flow. What's the expected behavior? Should the embedder data be nullptr when realm is nullptr?
Contributor
There was a problem hiding this comment.
I haven't fully looked into how this slot is used but I suspect the fix is:
// Used to retrieve bindings
context->SetAlignedPointerInEmbedderData(
ContextEmbedderIndex::kBindingDataStoreIndex,
realm != nullptr ? realm->binding_data_store() : nullptr);aduh95 pushed a commit
to aduh95/node
that referenced
this pull request
Feb 18, 2025
Binding data is inherited from BaseObject and created in a specific realm. They need to be tracked on a per-realm basis so that they can be released properly when a realm is disposed. PR-URL: nodejs#46556 Backport-PR-URL: nodejs#47174 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> # Conflicts: # src/dataqueue/queue.cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Binding data is inherited from BaseObject and created in a specific realm. They need to be tracked on a per-realm basis so that they can be released properly when a realm is disposed.
PR-URL: #46556
Reviewed-By: Joyee Cheung joyeec9h3@gmail.com
Reviewed-By: Colin Ihrig cjihrig@gmail.com
Reviewed-By: Matteo Collina matteo.collina@gmail.com