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: nodejs#23662
Refs: nodejs#22675
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • 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.