Skip to content

src: simplify toggling the buffer zero-fill flag

In Electron, and by default in V8, we enable the V8 memory cage, which disallows pointers to memory outside of the cage. The zero-fill toggle is currently implemented as an external ArrayBuffer, which violates this policy and thus causes a crash when the memory cage is enabled. This PR changes the zero-fill toggle to be implemented without the use of an external ArrayBuffer.

cc @bnoordhuis who wrote this code back in https://github.com/nodejs/node/commit/27e84ddd4e10cdb40d6e89d872277abe16830eb0

Merge request reports

Loading