Skip to content

Please stop using v8::BackingStore::Reallocate #52234

Closed
@syg

Description

@syg

V8 is deprecating and removing v8::BackingStore::Reallocate for being a safety footgun: https://issues.chromium.org/u/1/issues/331326406

Node uses it currently AFAICT for some internal buffers. Note that since #43594, there is no performance benefit of using Reallocate. Node's override of Reallocate defers to the default implementation, which allocates a new block of memory and performs a copy. It would be better to explicitly allocate a new v8::BackingStore and explicitly memcpy for the current uses of Reallocate.

(If I have some time I'll try to make a PR. But if someone is inclined to change this, please do so!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    deprecationsIssues and PRs related to deprecations.v8 platformIssues and PRs related to Node's v8::Platform implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions