mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
[bun.js] Handle UTF-16 strings in StringOrBuffer
This commit is contained in:
@@ -1179,7 +1179,7 @@ const Arguments = struct {
|
||||
|
||||
if (exception.* != null) return null;
|
||||
|
||||
const buffer = StringOrBuffer.fromJS(ctx.ptr(), arguments.next() orelse {
|
||||
const buffer = StringOrBuffer.fromJS(ctx.ptr(), arguments.arena.allocator(), arguments.next() orelse {
|
||||
if (exception.* == null) {
|
||||
JSC.throwInvalidArguments(
|
||||
"data is required",
|
||||
@@ -1490,7 +1490,7 @@ const Arguments = struct {
|
||||
|
||||
if (exception.* != null) return null;
|
||||
|
||||
const data = StringOrBuffer.fromJS(ctx.ptr(), arguments.next() orelse {
|
||||
const data = StringOrBuffer.fromJS(ctx.ptr(), arguments.arena.allocator(), arguments.next() orelse {
|
||||
if (exception.* == null) {
|
||||
JSC.throwInvalidArguments(
|
||||
"data is required",
|
||||
|
||||
Reference in New Issue
Block a user