Skip to content

Commit 9c98d25

Browse files
Sebastien-AhkrinMylesBorins
authored andcommitted
stream: replace Function.prototype with primordial
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>
1 parent 9643718 commit 9c98d25

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/_stream_writable.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
const{
2929
Array,
30+
FunctionPrototype,
3031
ObjectDefineProperty,
3132
ObjectSetPrototypeOf,
3233
Symbol,
@@ -205,7 +206,7 @@ ObjectDefineProperty(WritableState.prototype, 'buffer', {
205206
// whose prototype chain only points to Readable.
206207
varrealHasInstance;
207208
if(typeofSymbol==='function'&&SymbolHasInstance){
208-
realHasInstance=Function.prototype[SymbolHasInstance];
209+
realHasInstance=FunctionPrototype[SymbolHasInstance];
209210
ObjectDefineProperty(Writable,SymbolHasInstance,{
210211
value: function(object){
211212
if(realHasInstance.call(this,object))

0 commit comments

Comments
 (0)