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 <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
  • 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.