Conversation
danlapid
commented
Aug 22, 2025
jasnell
reviewed
Aug 22, 2025
443d56a to
04ca90a
Compare
04ca90a to
d761d6a
Compare
jasnell
previously approved these changes
Aug 22, 2025
kentonv
requested changes
Aug 22, 2025
Member
kentonv
left a comment
There was a problem hiding this comment.
I'm a bit worried this is applying RAII patterns to GC'd objects.
JSG promises don't have a notion of cancellation. If the promise never resolves, the attachment might just be held forever or might be destroyed during GC at an unpredictable time. It would be unsafe to attach any I/O objects in this way unless they are wrapped in IoOwn (and I believe the TraceContext objects you're attaching are I/O objects, so this is broken).
Could the attachment itself hold GC references? If so this creates cycles. There doesn't appear to be any mechanism to make the attachment visitable.
kentonv
reviewed
Aug 22, 2025
kentonv
reviewed
Aug 22, 2025
9961726 to
2ad04f5
Compare
kentonv
approved these changes
Aug 22, 2025
2ad04f5 to
cdc6056
Compare
jasnell
reviewed
Aug 22, 2025
Still not entirely convinced this is correct but after verifying for myself my concern here is cleared.
cdc6056 to
d415d3b
Compare
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 free
to 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.
No description provided.