Skip to content

Commit 0a86d5c

Browse files
committed
server: disable auto transferable Buffers
1 parent 20282e0 commit 0a86d5c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

server/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/src/plugin/runtime/node-thread-worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class BufferTransfer implements RpcSerializer {
1616
// allow transfer of the buffer only if it sets the __rpc_transferable property.
1717
// this is the only safe way to do this, since call sites may return the same buffer
1818
// multiple times (like an image/jpeg MediaObject).
19-
if ((value as any).__rpc_transferable === true) {
19+
if ((value as any).__rpc_transferable !== true) {
2020
const ab = value.buffer.slice(value.byteOffset, value.byteOffset + value.byteLength);
2121
value = Buffer.from(ab);
2222
}

0 commit comments

Comments
 (0)