mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
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 <Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user