From 2bc2f72e343c744db1e7e93a3ae35a19c6c23d32 Mon Sep 17 00:00:00 2001 From: agape1225 <49804691+agape1225@users.noreply.github.com> Date: Thu, 6 Aug 2026 21:55:13 +0900 Subject: [PATCH] src: reuse cached strings in node_locks.cc 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()). --- src/node_locks.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_locks.cc b/src/node_locks.cc index 9c871569c4d4..26fac6b62c4c 100644 --- a/src/node_locks.cc +++ b/src/node_locks.cc @@ -817,10 +817,10 @@ void CreatePerIsolateProperties(IsolateData* isolate_data, PropertyAttribute read_only = static_cast( PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete); target->Set(FIXED_ONE_BYTE_STRING(isolate, "LOCK_MODE_SHARED"), - FIXED_ONE_BYTE_STRING(isolate, "shared"), + isolate_data->shared_string(), read_only); target->Set(FIXED_ONE_BYTE_STRING(isolate, "LOCK_MODE_EXCLUSIVE"), - FIXED_ONE_BYTE_STRING(isolate, "exclusive"), + isolate_data->exclusive_string(), read_only); target->Set(FIXED_ONE_BYTE_STRING(isolate, "LOCK_STOLEN_ERROR"), FIXED_ONE_BYTE_STRING(isolate, "LOCK_STOLEN"),