From 13bdc663000d87151e3f8669a2fa59bb1dc8398d Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Fri, 30 May 2025 00:35:23 +0000 Subject: [PATCH] fix: use toWTFString for JSValue string conversion in initgroups - Replace user.getString(globalObject) with user.toWTFString(globalObject) - Fix compilation errors: JSString* type mismatch and missing utf8() method - Proper exception handling with RETURN_IF_EXCEPTION Co-authored-by: Jarred-Sumner --- src/bun.js/bindings/BunProcess.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bun.js/bindings/BunProcess.cpp b/src/bun.js/bindings/BunProcess.cpp index 33fae1f8eb..4d2866e6dd 100644 --- a/src/bun.js/bindings/BunProcess.cpp +++ b/src/bun.js/bindings/BunProcess.cpp @@ -2565,9 +2565,9 @@ JSC_DEFINE_HOST_FUNCTION(Process_functioninitgroups, (JSGlobalObject * globalObj } username = pp->pw_name; } else { - JSString* str = user.getString(globalObject); + auto userString = user.toWTFString(globalObject); RETURN_IF_EXCEPTION(scope, {}); - auto utf8 = str->utf8(); + auto utf8 = userString.utf8(); username = utf8.data(); }