Skip to content

Commit 20373c4

Browse files
addaleaxjasnell
authored andcommitted
stream: undo internalBinding() conversion in compat mechanism
PR-URL: #23662 Refs: #22675 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent b5c75a3 commit 20373c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/stream.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ try {
4949
} else {
5050
// This throws for Node < 4.2.0 because there's no util binding and
5151
// returns undefined for Node < 7.4.0.
52-
Stream._isUint8Array = internalBinding('util').isUint8Array;
52+
// Please do not convert process.binding() to internalBinding() here.
53+
// This is for compatibility with older versions when loaded as
54+
// readable-stream.
55+
Stream._isUint8Array = process.binding('util').isUint8Array;
5356
}
5457
} catch (e) {
5558
}

0 commit comments

Comments
 (0)