Open
Conversation
650bf07 to
c888749
Compare
erights
commented
Jan 2, 2026
Comment on lines
+93
to
+98
| // Propagate cancellation from parent if provided | ||
| if (parentCancelled) { | ||
| if (isKnownCancelled(parentCancelled)) { | ||
| knownCancelledSet.add(cancelled); | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This is an orthogonal observable change from #3032 . I claim it is an improvement, in that if the parent is already known to be cancelled, then the child is born cancelled. You could adopt this observable change by itself, without the rest of the PR.
Btw, this observable change did not affect any tests.
c888749 to
39d36fa
Compare
erights
commented
Jan 2, 2026
| /** | ||
| * @type {WeakSet<Promise>} | ||
| */ | ||
| const knownCancelledSet = new WeakSet(); |
Contributor
Author
There was a problem hiding this comment.
Turns out that isKnownCancelled's use of this piece of static mutable state does make it a communication channel. This SECURITY BUG seems inherent in this approach, which is why this is a failed experiment. See below.
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.
Closes: #XXXX
Refs: #XXXX
Description
Security Considerations
Scaling Considerations
Documentation Considerations
Testing Considerations
Compatibility Considerations
Upgrade Considerations