diff options
Diffstat (limited to 'src/bun.js')
-rw-r--r-- | src/bun.js/api/ffi.zig | 8 | ||||
-rw-r--r-- | src/bun.js/bindings/bindings.zig | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/bun.js/api/ffi.zig b/src/bun.js/api/ffi.zig index 097b66d35..234b58888 100644 --- a/src/bun.js/api/ffi.zig +++ b/src/bun.js/api/ffi.zig @@ -317,8 +317,12 @@ pub const FFI = struct { }; }; }; - - var obj = JSC.JSValue.createEmptyObject(global, symbols.values().len); + + var size = symbols.values().len; + if(size >= 63) { + size = 0; + } + var obj = JSC.JSValue.createEmptyObject(global, size); obj.protect(); defer obj.unprotect(); for (symbols.values()) |*function| { diff --git a/src/bun.js/bindings/bindings.zig b/src/bun.js/bindings/bindings.zig index 72393d639..3a0b369e9 100644 --- a/src/bun.js/bindings/bindings.zig +++ b/src/bun.js/bindings/bindings.zig @@ -3527,7 +3527,7 @@ pub const JSValue = enum(JSValueReprInt) { } pub fn createEmptyObject(global: *JSGlobalObject, len: usize) JSValue { - std.debug.assert(len <= 64); // max inline capacity JSC allows is 64. If you run into this, just set it to 0. + std.debug.assert(len <= 63); // max inline capacity JSC allows is 63. If you run into this, just set it to 0. return cppFn("createEmptyObject", .{ global, len }); } |