aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/base.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/base.zig')
-rw-r--r--src/bun.js/base.zig50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/bun.js/base.zig b/src/bun.js/base.zig
index 579a0975a..0528eb8d1 100644
--- a/src/bun.js/base.zig
+++ b/src/bun.js/base.zig
@@ -1824,31 +1824,31 @@ pub const ArrayBuffer = extern struct {
return this.value;
}
- // If it's not a mimalloc heap buffer, we're not going to call a deallocator
- if (this.len > 0 and !bun.Mimalloc.mi_is_in_heap_region(this.ptr)) {
- log("toJS but will never free: {d} bytes", .{this.len});
-
- if (this.typed_array_type == .ArrayBuffer) {
- return JSC.JSValue.fromRef(JSC.C.JSObjectMakeArrayBufferWithBytesNoCopy(
- ctx,
- this.ptr,
- this.byte_len,
- null,
- null,
- exception,
- ));
- }
-
- return JSC.JSValue.fromRef(JSC.C.JSObjectMakeTypedArrayWithBytesNoCopy(
- ctx,
- this.typed_array_type.toC(),
- this.ptr,
- this.byte_len,
- null,
- null,
- exception,
- ));
- }
+ // // If it's not a mimalloc heap buffer, we're not going to call a deallocator
+ // if (this.len > 0 and !bun.Mimalloc.mi_is_in_heap_region(this.ptr)) {
+ // log("toJS but will never free: {d} bytes", .{this.len});
+
+ // if (this.typed_array_type == .ArrayBuffer) {
+ // return JSC.JSValue.fromRef(JSC.C.JSObjectMakeArrayBufferWithBytesNoCopy(
+ // ctx,
+ // this.ptr,
+ // this.byte_len,
+ // null,
+ // null,
+ // exception,
+ // ));
+ // }
+
+ // return JSC.JSValue.fromRef(JSC.C.JSObjectMakeTypedArrayWithBytesNoCopy(
+ // ctx,
+ // this.typed_array_type.toC(),
+ // this.ptr,
+ // this.byte_len,
+ // null,
+ // null,
+ // exception,
+ // ));
+ // }
return this.toJSUnchecked(ctx, exception);
}