Please sign in to comment.
src: fix check for accepting Buffers into Node’s allocator
This condition was incorrect. We currently take the fallback path in default Node builds, which always works, but may come with some overhead, whereas the intention was that we use the fast path in this condition. This is causing issues for embedders, because we would erroneously try to take the fast path when they don’t provide a Node.js-style `ArrayBufferAlloactor`, and crash as a consequence of that. This also requires us to relax the check in the debugging ArrayBuffer allocator a bit, because since d117e41, 0-sized ArrayBuffers may actually point to allocations of size 1. Previously, that wasn’t caught because the fallback path circumvented our ArrayBufferAllocator. Refs: 84e02b1#r33116006 PR-URL: #27174 Reviewed-By: Joyee Cheung <firstname.lastname@example.org> Reviewed-By: Richard Lau <email@example.com> Reviewed-By: Colin Ihrig <firstname.lastname@example.org> Reviewed-By: James M Snell <email@example.com> Reviewed-By: Gus Caplan <firstname.lastname@example.org>
- Loading branch information...
Showing with 6 additions and 2 deletions.