Skip to content

v8.deserialize triggers Buffer constructor deprecation warning #21181

Closed
@Conduitry

Description

@Conduitry
  • Version: Observed on 10.4.0, presumably occurs on all 10+
  • Platform: All

Deserializing a representation of an expression that contained a Buffer displays(node:15176) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

Reproduce withv8.deserialize(v8.serialize(Buffer.alloc(0))).

It looks like DefaultDeserializer ._readHostObject() needs a special case for buffers.

Metadata

Metadata

Assignees

Labels

bufferIssues and PRs related to the buffer subsystem.confirmed-bugIssues with confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions