diff options
author | 2023-05-05 17:16:47 -0700 | |
---|---|---|
committer | 2023-05-05 17:16:47 -0700 | |
commit | f95a81e05de50debf60771c46111d115334afe96 (patch) | |
tree | 7185472fe7a7484452a6ac6f84ec89ed40911879 /src/bun.js | |
parent | c3d512f27e76f2e877b8843a3a420ae06237a8a1 (diff) | |
download | bun-f95a81e05de50debf60771c46111d115334afe96.tar.gz bun-f95a81e05de50debf60771c46111d115334afe96.tar.zst bun-f95a81e05de50debf60771c46111d115334afe96.zip |
[napi] Fix crash in `napi_create_external_buffer`
This impacted LightningCSS when garbage collection ran. cc @devongovett
Diffstat (limited to 'src/bun.js')
-rw-r--r-- | src/bun.js/base.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/base.zig b/src/bun.js/base.zig index da9501541..7fe37dd97 100644 --- a/src/bun.js/base.zig +++ b/src/bun.js/base.zig @@ -2129,7 +2129,7 @@ pub const ExternalBuffer = struct { } pub fn toJS(this: *ExternalBuffer, ctx: *JSC.JSGlobalObject) JSC.JSValue { - return JSC.JSValue.createBufferWithCtx(ctx, this.buf, this.ctx, ExternalBuffer_deallocator); + return JSC.JSValue.createBufferWithCtx(ctx, this.buf, this, ExternalBuffer_deallocator); } pub fn toArrayBuffer(this: *ExternalBuffer, ctx: *JSC.JSGlobalObject) JSC.JSValue { |