aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/generated_classes.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-08-24 19:39:00 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-24 19:39:00 -0700
commit8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3 (patch)
tree20d8dc382512313061c20296d1e33e8d18fbbde3 /src/bun.js/bindings/generated_classes.zig
parent097ae4e982a9cbcae6b4886c4efb82d452629b99 (diff)
downloadbun-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.zig5
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" });