Skip to content

Commit

Permalink
stream: undo internalBinding() conversion in compat mechanism
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
addaleax authored and danbev committed Oct 18, 2018
1 parent c1b9be5 commit 4e9e0d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ try {
} else {
// This throws for Node < 4.2.0 because there's no util binding and
// returns undefined for Node < 7.4.0.
Stream._isUint8Array = internalBinding('util').isUint8Array;
// Please do not convert process.binding() to internalBinding() here.
// This is for compatibility with older versions when loaded as
// readable-stream.
Stream._isUint8Array = process.binding('util').isUint8Array;
}
} catch (e) {
}
Expand Down

0 comments on commit 4e9e0d3

Please sign in to comment.