Skip to content

src: integrate ContextifyContext to cppgc#56522

Closed
joyeecheung wants to merge 4 commits intonodejs:mainfrom
joyeecheung:contextify-cppgc
Closed

src: integrate ContextifyContext to cppgc#56522
joyeecheung wants to merge 4 commits intonodejs:mainfrom
joyeecheung:contextify-cppgc

Conversation

@joyeecheung
Copy link
Copy Markdown
Member

@joyeecheung joyeecheung commented Jan 8, 2025

This simplifies the memory management of ContextifyContext,
making all references visible to V8.

The destructors don't need to do anything because when the wrapper is
going away, the context is already going away or otherwise it would've
been holding the wrapper alive, so there's no need to reset the
pointers in the context. Also, any global handles to the context
would've been empty at this point, and the per-Environment context
tracking code is capable of dealing with empty handles from contexts
purged elsewhere.

To this end, the context tracking code also purges empty handles
from the list now, to prevent keeping too many empty handles around.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants