src,stream: use SetAccessorProperty instead of SetAccessor
Fixes: https://github.com/nodejs/node/issues/17636 Refs: https://github.com/nodejs/node/pull/16482 Refs: https://github.com/nodejs/node/pull/16860
As per #17636 (closed)'s solution 1 (found in https://github.com/nodejs/node/issues/17636#issuecomment-351223679), this PR allows Object.getOwnPropertyDescriptor(process.stdin._handle.__proto__, 'bytesRead')
to not throw anymore and return an object/property descriptor. However, accessing this property using process.stdin._handle.__proto__.bytesRead
will still throw (as is the current case on 8.9.2+).
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
src, stream