diff options
author | 2022-11-23 07:14:33 -0800 | |
---|---|---|
committer | 2022-11-23 07:14:33 -0800 | |
commit | ac36ea51cfb85130403ac09299f8e1207bad4bcb (patch) | |
tree | a05bc2d34295bc0087b68b799155f18050451721 /src/bun.js/api/bun.zig | |
parent | ae3fcb5bd89a4ac908ba6d4cdb1be4e7c7f0ea81 (diff) | |
download | bun-ac36ea51cfb85130403ac09299f8e1207bad4bcb.tar.gz bun-ac36ea51cfb85130403ac09299f8e1207bad4bcb.tar.zst bun-ac36ea51cfb85130403ac09299f8e1207bad4bcb.zip |
possibly more reliable Bun.spawn (#1547)
* wip
* wip
* Fix bug with stdin
* zig fmt
* seems to work!
* Update streams.test.js
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/api/bun.zig')
-rw-r--r-- | src/bun.js/api/bun.zig | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/bun.js/api/bun.zig b/src/bun.js/api/bun.zig index 3a88f7a04..ee26b09f5 100644 --- a/src/bun.js/api/bun.zig +++ b/src/bun.js/api/bun.zig @@ -2448,8 +2448,7 @@ pub const Timer = struct { } pub fn deinit(this: *Timeout) void { - if (comptime JSC.is_bindgen) - unreachable; + JSC.markBinding(@src()); var vm = this.globalThis.bunVM(); this.poll_ref.unref(vm); @@ -2465,7 +2464,7 @@ pub const Timer = struct { countdown: JSValue, repeat: bool, ) !void { - if (comptime is_bindgen) unreachable; + JSC.markBinding(@src()); var vm = globalThis.bunVM(); // We don't deal with nesting levels directly @@ -2534,7 +2533,7 @@ pub const Timer = struct { callback: JSValue, countdown: JSValue, ) callconv(.C) JSValue { - if (comptime is_bindgen) unreachable; + JSC.markBinding(@src()); const id = globalThis.bunVM().timer.last_id; globalThis.bunVM().timer.last_id +%= 1; @@ -2548,7 +2547,7 @@ pub const Timer = struct { callback: JSValue, countdown: JSValue, ) callconv(.C) JSValue { - if (comptime is_bindgen) unreachable; + JSC.markBinding(@src()); const id = globalThis.bunVM().timer.last_id; globalThis.bunVM().timer.last_id +%= 1; @@ -2559,7 +2558,7 @@ pub const Timer = struct { } pub fn clearTimer(timer_id: JSValue, _: *JSGlobalObject, repeats: bool) void { - if (comptime is_bindgen) unreachable; + JSC.markBinding(@src()); var map = if (repeats) &VirtualMachine.vm.timer.interval_map else &VirtualMachine.vm.timer.timeout_map; const id: Timeout.ID = .{ @@ -2580,7 +2579,7 @@ pub const Timer = struct { globalThis: *JSGlobalObject, id: JSValue, ) callconv(.C) JSValue { - if (comptime is_bindgen) unreachable; + JSC.markBinding(@src()); Timer.clearTimer(id, globalThis, false); return JSValue.jsUndefined(); } @@ -2588,7 +2587,7 @@ pub const Timer = struct { globalThis: *JSGlobalObject, id: JSValue, ) callconv(.C) JSValue { - if (comptime is_bindgen) unreachable; + JSC.markBinding(@src()); Timer.clearTimer(id, globalThis, true); return JSValue.jsUndefined(); } |