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 <email@example.com> Reviewed-By: Richard Lau <firstname.lastname@example.org> Reviewed-By: Colin Ihrig <email@example.com> Reviewed-By: James M Snell <firstname.lastname@example.org> Reviewed-By: Gus Caplan <email@example.com>
- Loading branch information...
Showing with 6 additions and 2 deletions.