Skip to content

Commit a987972

Browse files
Sebastien-Ahkrincodebytere
authored andcommitted
stream: replace Function.prototype with primordial
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]>
1 parent 073b4f2 commit a987972

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎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,
@@ -199,7 +200,7 @@ ObjectDefineProperty(WritableState.prototype, 'buffer',{
199200
// whose prototype chain only points to Readable.
200201
varrealHasInstance;
201202
if(typeofSymbol==='function'&&SymbolHasInstance){
202-
realHasInstance=Function.prototype[SymbolHasInstance];
203+
realHasInstance=FunctionPrototype[SymbolHasInstance];
203204
ObjectDefineProperty(Writable,SymbolHasInstance,{
204205
value: function(object){
205206
if(realHasInstance.call(this,object))

0 commit comments

Comments
(0)