src: reuse cached strings in node_locks.cc - #65081
Open
agape1225 wants to merge 1 commit into
Open
Conversation
CreatePerIsolateProperties() created new "shared" and "exclusive" strings via FIXED_ONE_BYTE_STRING() on every isolate, even though these are already cached on IsolateData as shared_string() and exclusive_string() and reused that way elsewhere in this file (CreateLockInfoObject()).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65081 +/- ##
==========================================
+ Coverage 90.29% 90.32% +0.02%
==========================================
Files 759 759
Lines 247754 248258 +504
Branches 46721 46848 +127
==========================================
+ Hits 223708 224230 +522
+ Misses 15521 15459 -62
- Partials 8525 8569 +44
🚀 New features to boost your workflow:
|
daeyeon
approved these changes
Aug 6, 2026
Member
|
Please add the |
Member
|
Thanks for the contribution. I missed this during my initial review. Duplicate of #65039. |
ronag
approved these changes
Aug 6, 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.
CreatePerIsolateProperties()insrc/node_locks.cccreated new"shared"and"exclusive"V8 strings viaFIXED_ONE_BYTE_STRING()on every isolate, even though these strings are already cached onIsolateDataasshared_string()/exclusive_string()(defined viaPER_ISOLATE_STRING_PROPERTIESinsrc/env_properties.h) and are already reused this way elsewhere in the same file (CreateLockInfoObject()).This replaces the two ad-hoc
FIXED_ONE_BYTE_STRING(isolate, "shared"/"exclusive")calls with the existing cached accessors for consistency with the rest of the file and to avoid creating duplicate string instances.