Skip to content

Electron 21 breaks api compatability with some modules #441

@Julusian

Description

@Julusian

Blog post about the change: https://www.electronjs.org/blog/v8-memory-cage, coming to v21, not 20 like the post states.

Essentially calls to napi_create_external_buffer fail with

[827133:0924/184053.372625:ERROR:node_bindings.cc(146)] Fatal error in V8: v8_ArrayBuffer_NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers.

To me this goes directly against the promises of node-api, as 5 of 5 of the native modules I have contributed to will not work in electron 21 without changes.

I don't know if people here have any sway over at electron, but as they currently support the same node-api and will soon be using a subtly different version of node-api (which doesnt have its own documentation), it might be a good idea to talk with them about it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions