Commit 58f9b6d9 authored by Ojas Shirekar's avatar Ojas Shirekar Committed by James M Snell
Browse files

buffer: fix check for `.buffer` property

isSharedArrayBuffer in fromObject was missing obj.buffer
moved the 'length' in obj check so that it is checked first making
the code slightly more performant and able to handle SharedArrayBuffer
without relying on an explicit check.

Ref: https://github.com/nodejs/node/pull/8510
PR-URL: https://github.com/nodejs/node/pull/8739


Reviewed-By: default avatarIlkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent 13b4687e
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