Skip to content

Commit

Permalink
stream: replace Function.prototype with primordial
Browse files Browse the repository at this point in the history
PR-URL: #31204
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
  • Loading branch information
Sebastien-Ahkrin authored and MylesBorins committed Jan 16, 2020
1 parent 9643718 commit 9c98d25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

const {
Array,
FunctionPrototype,
ObjectDefineProperty,
ObjectSetPrototypeOf,
Symbol,
Expand Down Expand Up @@ -205,7 +206,7 @@ ObjectDefineProperty(WritableState.prototype, 'buffer', {
// whose prototype chain only points to Readable.
var realHasInstance;
if (typeof Symbol === 'function' && SymbolHasInstance) {
realHasInstance = Function.prototype[SymbolHasInstance];
realHasInstance = FunctionPrototype[SymbolHasInstance];
ObjectDefineProperty(Writable, SymbolHasInstance, {
value: function(object) {
if (realHasInstance.call(this, object))
Expand Down

0 comments on commit 9c98d25

Please sign in to comment.