Repository navigation
Conversation
Signed-off-by: Tim Perry <pimterry@gmail.com>
Collaborator
|
Review requested:
|
Member
Author
|
@nodejs/quic |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #67758 +/- ##
==========================================
- Coverage 90.54% 90.54% -0.01%
==========================================
Files 803 803
Lines 285110 285127 +17
Branches 55032 55028 -4
==========================================
+ Hits 258143 258157 +14
- Misses 17103 17109 +6
+ Partials 9864 9861 -3
🚀 New features to boost your workflow:
|
gurgunday
approved these changes
Nov 24, 2026
Collaborator
jasnell
approved these changes
Nov 25, 2026
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.
A single character fix!
NgHeader::GetNameattempts to cache JS String objects for known common header names. Unfortunately, it didn't. Instead, it effectively created a new permanent cache value for every header, for every request, and threw away the key.This happens because it copies the
v8::Eternalfrom the cache map, instead of referencing it, and so the subsequenteternal.Setcall doesn't actually end up updating the value in the cache - it just updates the local copy. This does store the JS string permanently, but it puts the key into the local copy of the eternal that's dropped at the end of the function. Because it's not cached, we do this every time, not just once.In practice, this leaks an eternal handle for every known header, for every HTTP/3 request, roughly 8 bytes for header ever received by the process, which can never be collected.
Referencing the eternal from the map instead of copying it fixes this. This matches equivalent code elsewhere, which does have the
&already:node/src/node_http_common.h
Line 416 in 475bed3