Commit 9c7d1910 authored by Anna Henningsen's avatar Anna Henningsen Committed by Rich Trott
Browse files

buffer: throw exception when creating from non-Node.js Context

Throw an exception instead of crashing when attempting to create
`Buffer` objects from a Context that is not associated with
a Node.js `Environment`.

Possible alternatives for the future might be just returning
a plain `Uint8Array`, or working on providing `Buffer` for all
`Context`s.

PR-URL: https://github.com/nodejs/node/pull/23938


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarDaniel Bevenius <daniel.bevenius@gmail.com>
parent d8fb81fa
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment