diff options
author | 2023-08-24 19:39:00 -0700 | |
---|---|---|
committer | 2023-08-24 19:39:00 -0700 | |
commit | 8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3 (patch) | |
tree | 20d8dc382512313061c20296d1e33e8d18fbbde3 /src/bun.js/bindings/generated_classes.zig | |
parent | 097ae4e982a9cbcae6b4886c4efb82d452629b99 (diff) | |
download | bun-8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3.tar.gz bun-8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3.tar.zst bun-8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3.zip |
Report extra memory more (#4289)
* Report memory allocated in fetch
* Memory size reporting to `Headers`
* Fixup memory reporting allocator
* Make these tests do more
* cleanup some of this
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/generated_classes.zig')
-rw-r--r-- | src/bun.js/bindings/generated_classes.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bun.js/bindings/generated_classes.zig b/src/bun.js/bindings/generated_classes.zig index 50e1a620b..e98b8f973 100644 --- a/src/bun.js/bindings/generated_classes.zig +++ b/src/bun.js/bindings/generated_classes.zig @@ -467,6 +467,10 @@ pub const JSBlob = struct { extern fn Blob__dangerouslySetPtr(JSC.JSValue, ?*Blob) bool; comptime { + if (@TypeOf(Blob.estimatedSize) != (fn (*Blob) callconv(.C) usize)) { + @compileLog("Blob.estimatedSize is not a size function"); + } + if (@TypeOf(Blob.onStructuredCloneSerialize) != (fn (*Blob, globalThis: *JSC.JSGlobalObject, ctx: *anyopaque, writeBytes: *const fn (*anyopaque, ptr: [*]const u8, len: u32) callconv(.C) void) callconv(.C) void)) { @compileLog("Blob.onStructuredCloneSerialize is not a structured clone serialize function"); } @@ -513,6 +517,7 @@ pub const JSBlob = struct { @compileLog("Expected Blob.getWriter to be a callback but received " ++ @typeName(@TypeOf(Blob.getWriter))); if (!JSC.is_bindgen) { @export(Blob.constructor, .{ .name = "BlobClass__construct" }); + @export(Blob.estimatedSize, .{ .name = "Blob__estimatedSize" }); @export(Blob.finalize, .{ .name = "BlobClass__finalize" }); @export(Blob.getArrayBuffer, .{ .name = "BlobPrototype__getArrayBuffer" }); @export(Blob.getExists, .{ .name = "BlobPrototype__getExists" }); |