-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
buffer: zero-sized slices have .buffer but not .parent #8266
Copy link
Copy link
Closed
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.
Description
Something that tripped me up earlier today. With master:
$ git rev-parse HEAD
7f1bb8044a3cb3cf8bcf525bcb4dd7d924e05fe3
$ out/Release/node
> Buffer(1).slice(0,1).parent // one-byte slice has .parent
ArrayBuffer { byteLength: 8192 }
> Buffer(1).slice(0,0).buffer // zero-sized slice has .buffer
ArrayBuffer { byteLength: 8192 }
> Buffer(1).slice(0,0).parent // zero-sized slice doesn't have .parent
undefined
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.