Skip to content
This repository was archived by the owner on Jul 25, 2019. It is now read-only.
This repository was archived by the owner on Jul 25, 2019. It is now read-only.

Use v8::ArrayBuffer instead of node::Buffer #90

@kenny-y

Description

@kenny-y

Suggest the substitution based on the following facts:

  • v8::ArrayBuffer can own a buffer (delete the underlying raw buffer in dtor), or borrow a buffer with creation flag ArrayBufferCreationMode::kExternalized) (does not delete), so it's possible to reduce buffer deep copying when using v8::ArrayBuffer in user program
  • It's easy to allocate views for v8::ArrayBuffer in C++ code, ref issue Typed array support #89

Ref:

  1. https://github.com/nodejs/node/blob/master/src/node_buffer.h
  2. https://v8docs.nodesource.com/node-6.9/d5/d6e/classv8_1_1_array_buffer.html

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions